diff --git a/rtgui/controllines.cc b/rtgui/controllines.cc index c08fbd1d2..d321abd07 100644 --- a/rtgui/controllines.cc +++ b/rtgui/controllines.cc @@ -104,6 +104,9 @@ bool ControlLineManager::button1Pressed(int modifierKey) action = Action::DRAGGING; } } else if (draw_mode && (modifierKey & GDK_CONTROL_MASK)) { // Add new line. + if (object < 0) { + return false; + } addLine(dataProvider->posImage, dataProvider->posImage); drawing_line = true; selected_object = mouseOverGeometry.size() - 1; // Select endpoint. @@ -125,7 +128,7 @@ bool ControlLineManager::button1Released(void) callbacks->lineChanged(); drawing_line = false; selected_object = -1; - return false; + return true; } bool ControlLineManager::button3Pressed(int modifierKey) @@ -139,7 +142,7 @@ bool ControlLineManager::button3Pressed(int modifierKey) } action = Action::PICKING; - return false; + return true; } bool ControlLineManager::pick1(bool picked) @@ -194,7 +197,7 @@ bool ControlLineManager::pick3(bool picked) removeLine((provider->getObject() - 1) / ::ControlLine::OBJ_COUNT); prev_obj = -1; selected_object = -1; - return false; + return true; } bool ControlLineManager::drag1(int modifierKey) @@ -264,7 +267,7 @@ bool ControlLineManager::drag1(int modifierKey) autoSetLineType(selected_object); } - return false; + return true; } void ControlLineManager::releaseEdit(void) diff --git a/rtgui/cropwindow.cc b/rtgui/cropwindow.cc index 5a1debb23..b612de2e7 100644 --- a/rtgui/cropwindow.cc +++ b/rtgui/cropwindow.cc @@ -540,7 +540,7 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y) action_y = 0; } - } else if (iarea->getToolMode () == TMHand) { // events outside of the image domain + } else if (iarea->getToolMode () == TMHand || iarea->getToolMode() == TMPerspective) { // events outside of the image domain EditSubscriber *editSubscriber = iarea->getCurrSubscriber(); if (editSubscriber && editSubscriber->getEditingType() == ET_OBJECTS) {