Skip to content

Commit

Permalink
Color wheel: 'hide' useless previous color
Browse files Browse the repository at this point in the history
Fix previous behaviour of setting previous color to current, due
to the realtime nature of updates.
  • Loading branch information
caryoscelus committed Nov 9, 2017
1 parent 951cd2d commit 4fc53af
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions synfig-studio/src/gui/widgets/widget_coloredit.cpp
Expand Up @@ -509,12 +509,11 @@ void Widget_ColorEdit::setHVSColor(synfig::Color color)
gtkColor.set_red((unsigned short)(r * USHRT_MAX));
gtkColor.set_green((unsigned short)(g * USHRT_MAX));
gtkColor.set_blue((unsigned short)(b * USHRT_MAX));
auto current_color = hvsColorWidget->get_current_color();
if (!are_close_colors(current_color, gtkColor)) {
if (!are_close_colors(hvsColorWidget->get_current_color(), gtkColor)) {
colorHVSChanged = true;
hvsColorWidget->set_previous_color (gtkColor); //We can't use it there, cause color changes in realtime.
hvsColorWidget->set_current_color (gtkColor);
hvsColorWidget->set_current_color(gtkColor);
}
hvsColorWidget->set_previous_color(hvsColorWidget->get_current_color()); //We can't use it there, cause color changes in realtime.
colorHVSChanged = false;
}

Expand Down

0 comments on commit 4fc53af

Please sign in to comment.