diff --git a/toonz/sources/toonz/pltgizmopopup.cpp b/toonz/sources/toonz/pltgizmopopup.cpp index 7cd428a..73f531a 100644 --- a/toonz/sources/toonz/pltgizmopopup.cpp +++ b/toonz/sources/toonz/pltgizmopopup.cpp @@ -166,7 +166,7 @@ public: tmpmatte = 0; else if (tmpmatte > 255) tmpmatte = 255; - color.m = tmpmatte; + color.m = tmpmatte; return color; } }; @@ -186,7 +186,7 @@ public: tmpmatte = 0; else if (tmpmatte > 255) tmpmatte = 255; - color.m = tmpmatte; + color.m = tmpmatte; return color; } }; @@ -377,11 +377,11 @@ void modifyColor(const T &modifier) { TUndo *undo; TStyleSelection *selection = dynamic_cast( TApp::instance()->getCurrentSelection()->getSelection()); - if (selection) { + if (selection && !selection->isEmpty()) { undo = new GizmoUndo(*selection); getStyleIds(styleIds, *selection); } - /*-- StyleSelectionが有効でない場合はカレントStyleを用いる --*/ + // modify the current style if the style selection is not active or is empty else { TStyleSelection tmpSelection; tmpSelection.setPaletteHandle(paletteHandle);