Leave gradient widget in good state on commit
Stop highlighting the hovered or dragged geometry when disabling the widget.
This commit is contained in:
parent
3ade11c970
commit
4bc69dc30c
@ -325,6 +325,7 @@ void Gradient::editToggled ()
|
|||||||
if (edit->get_active()) {
|
if (edit->get_active()) {
|
||||||
subscribe();
|
subscribe();
|
||||||
} else {
|
} else {
|
||||||
|
releaseEdit();
|
||||||
unsubscribe();
|
unsubscribe();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -579,6 +580,19 @@ bool Gradient::drag1(int modifierKey)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Gradient::releaseEdit()
|
||||||
|
{
|
||||||
|
if (lastObject >= 0) {
|
||||||
|
if (lastObject == 2 || lastObject == 3) {
|
||||||
|
EditSubscriber::visibleGeometry.at(2)->state = Geometry::NORMAL;
|
||||||
|
EditSubscriber::visibleGeometry.at(3)->state = Geometry::NORMAL;
|
||||||
|
} else {
|
||||||
|
EditSubscriber::visibleGeometry.at(lastObject)->state = Geometry::NORMAL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
action = Action::NONE;
|
||||||
|
}
|
||||||
|
|
||||||
void Gradient::switchOffEditMode ()
|
void Gradient::switchOffEditMode ()
|
||||||
{
|
{
|
||||||
if (edit->get_active()) {
|
if (edit->get_active()) {
|
||||||
|
@ -35,6 +35,7 @@ protected:
|
|||||||
sigc::connection editConn;
|
sigc::connection editConn;
|
||||||
|
|
||||||
void editToggled ();
|
void editToggled ();
|
||||||
|
void releaseEdit();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user