Skip to content

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

C

Add dirty flag to level when eraseStyle from raster/vector level

Abel You07dcf6fcfe98
diff --git a/toonz/sources/toonzlib/palettecmd.cpp b/toonz/sources/toonzlib/palettecmd.cpp
index 0b117a49f..c1ce1aaf0 100644
--- a/toonz/sources/toonzlib/palettecmd.cpp
+++ b/toonz/sources/toonzlib/palettecmd.cpp
@@ -511,6 +511,7 @@ void eraseStylesInLevels(const std::set<TXshSimpleLevel *> &levels,
else if (ti)
TRop::eraseStyleIds(ti.getPointer(), styleIds);
}
+ level->setDirtyFlag(true);
}
}
diff --git a/toonz/sources/toonzqt/dvdialog.cpp b/toonz/sources/toonzqt/dvdialog.cpp
index efff99048..34059c065 100644
--- a/toonz/sources/toonzqt/dvdialog.cpp
+++ b/toonz/sources/toonzqt/dvdialog.cpp
@@ -1470,7 +1470,7 @@ int DVGui::eraseStylesInDemand(TPalette *palette, std::vector<int> styleIds,
QApplication::restoreOverrideCursor();
assert(ret == 2 || ret == 3);
- return ret == 2; // return 2 ? :D
+ return ret == 2; // return true if need to delete Styles :D
}
//-----------------------------------------------------------------------------