Refactor rtgui/spot.cc

This commit is contained in:
Lawrence Lee
2021-05-30 12:05:51 -07:00
parent 5f88cf240e
commit 3c7e20b689

View File

@@ -208,14 +208,14 @@ void Spot::releaseEdit()
{ {
Geometry *loGeom = getVisibleGeometryFromMO (lastObject); Geometry *loGeom = getVisibleGeometryFromMO (lastObject);
EditSubscriber::action = EditSubscriber::Action::NONE;
if (!loGeom) { if (!loGeom) {
EditSubscriber::action = EditSubscriber::Action::NONE;
return; return;
} }
loGeom->state = Geometry::NORMAL; loGeom->state = Geometry::NORMAL;
sourceIcon.state = Geometry::NORMAL; sourceIcon.state = Geometry::NORMAL;
EditSubscriber::action = EditSubscriber::Action::NONE;
draggedSide = DraggedSide::NONE; draggedSide = DraggedSide::NONE;
updateGeometry(); updateGeometry();
} }
@@ -686,8 +686,6 @@ bool Spot::button3Released()
updateGeometry(); updateGeometry();
EditSubscriber::action = EditSubscriber::Action::NONE; EditSubscriber::action = EditSubscriber::Action::NONE;
return true; return true;
return false;
} }
bool Spot::drag1 (int modifierKey) bool Spot::drag1 (int modifierKey)