From d76cf5cdaebee53cae907ef190819abd5a546919 Mon Sep 17 00:00:00 2001 From: Lawrence Lee Date: Wed, 24 Jun 2020 16:20:03 -0700 Subject: [PATCH] Make control lines hidden when switching mode The program now exits control line editing mode when the perspective correction method is switched out of camera-based mode. --- rtgui/perspective.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/rtgui/perspective.cc b/rtgui/perspective.cc index 7ce981548..7048b31d1 100644 --- a/rtgui/perspective.cc +++ b/rtgui/perspective.cc @@ -517,6 +517,11 @@ void PerspCorrection::methodChanged (void) } else if (method->get_active_row_number() == 1) { pack_start (*camera_based); } + + // If no longer in camera-based mode and control lines are being edited. + if (method->get_active_row_number() != 1 && lines_button_edit->get_active()) { + lines_button_edit->set_active(false); + } } if (listener) { @@ -705,7 +710,10 @@ void PerspCorrection::linesEditButtonPressed(void) } lines_button_h->set_active(false); lines_button_v->set_active(false); - applyControlLines(); + if (method->get_active_row_number() == 1) { + // Calculate perspective distortion if in camera-based mode. + applyControlLines(); + } } }