Skip to content

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

C

fix viewer update again (#2097)

shun-iwasawa85f3fb90839f
diff --git a/toonz/sources/tnztools/brushtool.cpp b/toonz/sources/tnztools/brushtool.cpp
index ce6654a00..19bdf5299 100644
--- a/toonz/sources/tnztools/brushtool.cpp
+++ b/toonz/sources/tnztools/brushtool.cpp
@@ -1197,7 +1197,13 @@ void BrushTool::onDeactivate() {
bool BrushTool::preLeftButtonDown() {
touchImage();
- if (m_isFrameCreated) setWorkAndBackupImages();
+ if (m_isFrameCreated) {
+ setWorkAndBackupImages();
+ // When the xsheet frame is selected, whole viewer will be updated from
+ // SceneViewer::onXsheetChanged() on adding a new frame.
+ // We need to take care of a case when the level frame is selected.
+ if (m_application->getCurrentFrame()->isEditingLevel()) invalidate();
+ }
return true;
}