Skip to content

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

C

fix raster eraser crash (#1823)

shun-iwasawa67f18257d223
diff --git a/toonz/sources/tnztools/fullcolorerasertool.cpp b/toonz/sources/tnztools/fullcolorerasertool.cpp
index 0920cf22a..a537ea2d7 100644
--- a/toonz/sources/tnztools/fullcolorerasertool.cpp
+++ b/toonz/sources/tnztools/fullcolorerasertool.cpp
@@ -428,6 +428,12 @@ void FullColorEraserTool::onActivate() {
}
m_brushPad = getBrushPad(m_size.getValue(), m_hardness.getValue() * 0.01);
+
+ // setting m_level in resetMulti() will take care when the tool is switched
+ // via shortcut ( i.e. the case skipping onEnter() )
+ resetMulti();
+ // clear previous polyline when the tool is activated
+ m_polyline.clear();
}
//--------------------------------------------------------------------------------------------------