Leave spot removal widgets in good state on commit
Set the correct geometry states if edit mode is toggled off while a spot is being dragged.
This commit is contained in:
@@ -185,6 +185,25 @@ void Spot::resetPressed()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Release anything that's currently being dragged.
|
||||||
|
*/
|
||||||
|
void Spot::releaseEdit()
|
||||||
|
{
|
||||||
|
Geometry *loGeom = getVisibleGeometryFromMO (lastObject);
|
||||||
|
|
||||||
|
if (!loGeom) {
|
||||||
|
EditSubscriber::action = EditSubscriber::Action::NONE;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
loGeom->state = Geometry::ACTIVE;
|
||||||
|
sourceIcon.state = Geometry::ACTIVE;
|
||||||
|
EditSubscriber::action = EditSubscriber::Action::NONE;
|
||||||
|
draggedSide = DraggedSide::NONE;
|
||||||
|
updateGeometry();
|
||||||
|
}
|
||||||
|
|
||||||
void Spot::setBatchMode (bool batchMode)
|
void Spot::setBatchMode (bool batchMode)
|
||||||
{
|
{
|
||||||
ToolPanel::setBatchMode (batchMode);
|
ToolPanel::setBatchMode (batchMode);
|
||||||
@@ -237,6 +256,7 @@ void Spot::editToggled ()
|
|||||||
listener->refreshPreview(EvSpotEnabledOPA); // reprocess the preview w/o creating History entry
|
listener->refreshPreview(EvSpotEnabledOPA); // reprocess the preview w/o creating History entry
|
||||||
subscribe();
|
subscribe();
|
||||||
} else {
|
} else {
|
||||||
|
releaseEdit();
|
||||||
unsubscribe();
|
unsubscribe();
|
||||||
listener->unsetTweakOperator(this);
|
listener->unsetTweakOperator(this);
|
||||||
listener->refreshPreview(EvSpotEnabled); // reprocess the preview w/o creating History entry
|
listener->refreshPreview(EvSpotEnabled); // reprocess the preview w/o creating History entry
|
||||||
|
@@ -82,6 +82,7 @@ private:
|
|||||||
void addNewEntry ();
|
void addNewEntry ();
|
||||||
void deleteSelectedEntry ();
|
void deleteSelectedEntry ();
|
||||||
void resetPressed ();
|
void resetPressed ();
|
||||||
|
void releaseEdit();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Gtk::Box* labelBox;
|
Gtk::Box* labelBox;
|
||||||
|
Reference in New Issue
Block a user