Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

Fix(fillTool): Allows to fill the entire image when savebox is empty

Abel You00ba062a3133
diff --git a/toonz/sources/tnztools/filltool.cpp b/toonz/sources/tnztools/filltool.cpp
index 69c5d9cc6..972f0bbf3 100644
--- a/toonz/sources/tnztools/filltool.cpp
+++ b/toonz/sources/tnztools/filltool.cpp
@@ -1068,9 +1068,11 @@ void doRefFill(const TImageP &img, const TRaster32P &refImg, const TPointD &pos,
if (Preferences::instance()->getFillOnlySavebox()) {
TRectD bbox = ti->getBBox();
- TRect ibbox = convert(bbox);
- offs = ibbox.getP00();
- ras = ti->getRaster()->extract(ibbox);
+ if (!bbox.isEmpty()) {
+ TRect ibbox = convert(bbox);
+ offs = ibbox.getP00();
+ ras = ti->getRaster()->extract(ibbox);
+ }
}
bool recomputeSavebox = false;