diff view/ViewManager.cpp @ 1468:de41a11cabc2

Add opportunistic-editing toggle
author Chris Cannam
date Thu, 13 Jun 2019 15:35:01 +0100
parents f31ccc5f3fb8
children 9bf8aa2916e9
line wrap: on
line diff
--- a/view/ViewManager.cpp	Thu Jun 13 15:05:25 2019 +0100
+++ b/view/ViewManager.cpp	Thu Jun 13 15:35:01 2019 +0100
@@ -47,6 +47,7 @@
     m_alignMode(false),
     m_overlayMode(StandardOverlays),
     m_zoomWheelsEnabled(true),
+    m_opportunisticEditingEnabled(true),
     m_showCentreLine(true),
     m_illuminateLocalFeatures(true),
     m_showWorkTitle(false),
@@ -749,6 +750,15 @@
 }
 
 void
+ViewManager::setOpportunisticEditingEnabled(bool enabled)
+{
+    if (m_opportunisticEditingEnabled != enabled) {
+        m_opportunisticEditingEnabled = enabled;
+        emit opportunisticEditingEnabledChanged();
+    }
+}
+
+void
 ViewManager::setShowCentreLine(bool show)
 {
     if (m_showCentreLine != show) {