From 3c7e20b6897baffc3c88e16a2bcccf07e3974521 Mon Sep 17 00:00:00 2001 From: Lawrence Lee <45837045+Lawrence37@users.noreply.github.com> Date: Sun, 30 May 2021 12:05:51 -0700 Subject: [PATCH] Refactor rtgui/spot.cc --- rtgui/spot.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/rtgui/spot.cc b/rtgui/spot.cc index 3845751c9..d9a6be6b7 100644 --- a/rtgui/spot.cc +++ b/rtgui/spot.cc @@ -208,14 +208,14 @@ void Spot::releaseEdit() { Geometry *loGeom = getVisibleGeometryFromMO (lastObject); + EditSubscriber::action = EditSubscriber::Action::NONE; + if (!loGeom) { - EditSubscriber::action = EditSubscriber::Action::NONE; return; } loGeom->state = Geometry::NORMAL; sourceIcon.state = Geometry::NORMAL; - EditSubscriber::action = EditSubscriber::Action::NONE; draggedSide = DraggedSide::NONE; updateGeometry(); } @@ -686,8 +686,6 @@ bool Spot::button3Released() updateGeometry(); EditSubscriber::action = EditSubscriber::Action::NONE; return true; - - return false; } bool Spot::drag1 (int modifierKey)