diff view/Pane.cpp @ 660:8663a831838f tonioni

instrument is now "click" -- some other minor changes I don't remember
author matthiasm
date Thu, 20 Jun 2013 13:47:36 +0100
parents 76c5dfe333ee
children 1a0fdad4af4d
line wrap: on
line diff
--- a/view/Pane.cpp	Thu Jun 20 11:07:57 2013 +0100
+++ b/view/Pane.cpp	Thu Jun 20 13:47:36 2013 +0100
@@ -2107,10 +2107,10 @@
     if (mode == ViewManager::NavigateMode ||
         mode == ViewManager::EditMode) {
 
-    Layer *layer = getSelectedLayer();
-    if (layer && layer->isLayerEditable()) {
-        if (layer->editOpen(this, e)) relocate = false;
-    }
+        Layer *layer = getSelectedLayer();
+        if (layer && layer->isLayerEditable()) {
+            if (layer->editOpen(this, e)) relocate = false;
+        }
 
     } else if (mode == ViewManager::MeasureMode) {
 
@@ -2134,6 +2134,14 @@
             m_dragStartMinValue = dmin;
         }
     }
+    
+    if (mode == ViewManager::NoteEditMode) {
+        std::cerr << "double click in note edit mode" << std::endl;
+        Layer *layer = getSelectedLayer();
+        if (layer && layer->isLayerEditable()) {
+            layer->addNote(this, e); 
+        }
+    }
 
     m_clickedInRange = false; // in case mouseReleaseEvent is not properly called
 }