diff widgets/Pane.cpp @ 36:c28ebb4ba4de

* Improvements to text layer editing, and implement file I/O for it * Start some fixes to spectrogram frequency computation
author Chris Cannam
date Mon, 20 Feb 2006 17:23:40 +0000
parents 10ba9276a315
children 21d061e66177
line wrap: on
line diff
--- a/widgets/Pane.cpp	Mon Feb 20 13:33:36 2006 +0000
+++ b/widgets/Pane.cpp	Mon Feb 20 17:23:40 2006 +0000
@@ -616,6 +616,22 @@
 Pane::mouseDoubleClickEvent(QMouseEvent *e)
 {
     std::cerr << "mouseDoubleClickEvent" << std::endl;
+
+    m_clickPos = e->pos();
+    m_clickedInRange = true;
+    m_shiftPressed = (e->modifiers() & Qt::ShiftModifier);
+    m_ctrlPressed = (e->modifiers() & Qt::ControlModifier);
+
+    ViewManager::ToolMode mode = ViewManager::NavigateMode;
+    if (m_manager) mode = m_manager->getToolMode();
+
+    if (mode == ViewManager::EditMode) {
+
+	Layer *layer = getSelectedLayer();
+	if (layer && layer->isLayerEditable()) {
+	    layer->editOpen(e);
+	}
+    }
 }
 
 void
@@ -713,10 +729,11 @@
     case ViewManager::DrawMode:
 	setCursor(Qt::CrossCursor);
 	break;
-	
+/*	
     case ViewManager::TextMode:
 	setCursor(Qt::IBeamCursor);
 	break;
+*/
     }
 }