diff view/Pane.cpp @ 204:942cfa1df966

* Fix occasional misplacement of zoom wheels * Disable tearoff in context menu (it always got activated when you just clicked and released)
author Chris Cannam
date Mon, 26 Feb 2007 14:18:21 +0000
parents fcc043f75c41
children 6969f21da18a
line wrap: on
line diff
--- a/view/Pane.cpp	Wed Feb 14 17:52:06 2007 +0000
+++ b/view/Pane.cpp	Mon Feb 26 14:18:21 2007 +0000
@@ -202,12 +202,15 @@
 //        std::cerr << "set default value to " << m_hthumb->getDefaultValue() << std::endl;
     }
 
+    bool haveVThumb = false;
+
     if (layer) {
         int defaultStep = 0;
         int max = layer->getVerticalZoomSteps(defaultStep);
         if (max == 0) {
             m_vthumb->hide();
         } else {
+            haveVThumb = true;
             m_vthumb->show();
             m_vthumb->blockSignals(true);
             m_vthumb->setMinimumValue(0);
@@ -232,10 +235,14 @@
             connect(m_manager, SIGNAL(zoomLevelChanged()),
                     this, SLOT(zoomLevelChanged()));
         }
-        if (m_vthumb->isVisible()) {
+        if (haveVThumb) {
+            std::cerr << "vthumb is visible, moving to " << height() -86 << std::endl;
+            m_headsUpDisplay->setFixedHeight(m_vthumb->height() + m_hthumb->height());
             m_headsUpDisplay->move(width() - 86, height() - 86);
         } else {
-            m_headsUpDisplay->move(width() - 86, height() - 51);
+            std::cerr << "vthumb is invisible, moving to " << height() -51 << std::endl;
+            m_headsUpDisplay->setFixedHeight(m_hthumb->height());
+            m_headsUpDisplay->move(width() - 86, height() - 16);
         }
     } else {
         m_headsUpDisplay->hide();