Skip to content

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

C

fix palette gizmo target

shun-iwasawae297759e814b
diff --git a/toonz/sources/toonz/pltgizmopopup.cpp b/toonz/sources/toonz/pltgizmopopup.cpp
index 7cd428a8f..73f531a22 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<TStyleSelection *>(
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);