diff view/Pane.cpp @ 217:bd2d0346da0e

* Inhibit making and displaying time selections in slice layers
author Chris Cannam
date Mon, 05 Mar 2007 10:53:41 +0000
parents e554ab9a4408
children cd81066ac7ad
line wrap: on
line diff
--- a/view/Pane.cpp	Fri Mar 02 14:00:12 2007 +0000
+++ b/view/Pane.cpp	Mon Mar 05 10:53:41 2007 +0000
@@ -812,6 +812,8 @@
 
     } else if (mode == ViewManager::SelectMode) {
 
+        if (!hasTopLayerTimeXAxis()) return;
+
 	bool closeToLeft = false, closeToRight = false;
 	Selection selection = getSelectionAt(e->x(), closeToLeft, closeToRight);
 
@@ -909,6 +911,8 @@
 
     } else if (mode == ViewManager::SelectMode) {
 
+        if (!hasTopLayerTimeXAxis()) return;
+
 	if (m_manager && m_manager->haveInProgressSelection()) {
 
 	    bool exclusive;
@@ -970,7 +974,7 @@
 
     if (!m_clickedInRange) {
 	
-	if (mode == ViewManager::SelectMode) {
+	if (mode == ViewManager::SelectMode && hasTopLayerTimeXAxis()) {
 	    bool closeToLeft = false, closeToRight = false;
 	    getSelectionAt(e->x(), closeToLeft, closeToRight);
 	    if ((closeToLeft || closeToRight) && !(closeToLeft && closeToRight)) {
@@ -1011,6 +1015,8 @@
 
     } else if (mode == ViewManager::SelectMode) {
 
+        if (!hasTopLayerTimeXAxis()) return;
+
         dragExtendSelection(e);
 
     } else if (mode == ViewManager::DrawMode) {
@@ -1690,6 +1696,8 @@
         
     } else if (mode == ViewManager::SelectMode) {
 
+        if (!hasTopLayerTimeXAxis()) return;
+
         bool haveSelection = (m_manager && !m_manager->getSelections().empty());
 
         if (haveSelection) {