changeset 131:eae80729b665

Add a selection strip at the bottom, and remove the time ruler from the main pane
author Chris Cannam
date Thu, 09 Jan 2014 16:42:14 +0000
parents 55fac28b9193
children 2abff42be385
files .hgsubstate src/Analyser.cpp src/MainWindow.cpp
diffstat 3 files changed, 13 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/.hgsubstate	Thu Jan 09 16:07:29 2014 +0000
+++ b/.hgsubstate	Thu Jan 09 16:42:14 2014 +0000
@@ -2,4 +2,4 @@
 fffb975dc0b1d3a5cb74d4436194616d5d43014f sv-dependency-builds
 8611eb7be68928f08eab9dea747aeca55f03ea01 svapp
 8e22795fe30bf9540103181d994a2e795a83d8c0 svcore
-c65826b5e980005bbecb3da5b8d2fc1d2f7c4195 svgui
+084fd76deb89a36708fabd732dc04e578d75df78 svgui
--- a/src/Analyser.cpp	Thu Jan 09 16:07:29 2014 +0000
+++ b/src/Analyser.cpp	Thu Jan 09 16:42:14 2014 +0000
@@ -73,10 +73,7 @@
     // what have you). It could be hidden if we don't want to see it
     // but it must exist.
 
-    m_document->addLayerToView
-	(m_pane, m_document->createMainModelLayer(LayerFactory::TimeRuler));
-
-    // This waveform layer is just a shadow, light grey and taking up
+    // Our waveform layer is just a shadow, light grey and taking up
     // little space at the bottom
 
     WaveformLayer *waveform = qobject_cast<WaveformLayer *>
--- a/src/MainWindow.cpp	Thu Jan 09 16:07:29 2014 +0000
+++ b/src/MainWindow.cpp	Thu Jan 09 16:42:14 2014 +0000
@@ -1581,6 +1581,17 @@
             Pane *pane = m_paneStack->getCurrentPane();
             if (!pane) {
                 pane = m_paneStack->addPane();
+
+                Pane *selectionStrip = m_paneStack->addPane();
+                selectionStrip->setFixedHeight(26);
+                m_document->addLayerToView
+                    (selectionStrip,
+                     m_document->createMainModelLayer(LayerFactory::TimeRuler));
+                m_paneStack->sizePanesEqually();
+
+                m_viewManager->clearToolModeOverrides();
+                m_viewManager->setToolModeFor(selectionStrip,
+                                              ViewManager::SelectMode);
             }
             if (pane) {
                 m_analyser->newFileLoaded