diff view/Pane.cpp @ 300:0824a754a8eb

* Ensure labels and their pixmaps get redrawn properly
author Chris Cannam
date Thu, 06 Sep 2007 15:17:35 +0000
parents 5c59c433b358
children 5636eeacc467
line wrap: on
line diff
--- a/view/Pane.cpp	Wed Sep 05 15:17:15 2007 +0000
+++ b/view/Pane.cpp	Thu Sep 06 15:17:35 2007 +0000
@@ -711,7 +711,12 @@
     int fontHeight = paint.fontMetrics().height();
     int fontAscent = paint.fontMetrics().ascent();
 
-    if (r.y() + r.height() < height() - int(m_layers.size()) * fontHeight - 6) {
+    int lly = height() - 6;
+    if (m_manager->getZoomWheelsEnabled()) {
+        lly -= 20;
+    }
+
+    if (r.y() + r.height() < lly - int(m_layers.size()) * fontHeight) {
         return;
     }
 
@@ -728,15 +733,12 @@
     int maxTextWidth = width() / 3;
     texts = TextAbbrev::abbreviate(texts, paint.fontMetrics(), maxTextWidth);
 
-    int lly = height() - 6;
     int llx = width() - maxTextWidth - 5;
-    
     if (m_manager->getZoomWheelsEnabled()) {
-        lly -= 20;
         llx -= 36;
     }
     
-    if (r.x() + r.width() >= llx) {
+    if (r.x() + r.width() >= llx - fontAscent - 3) {
 	
         for (size_t i = 0; i < texts.size(); ++i) {