# HG changeset patch # User Chris Cannam # Date 1189091855 0 # Node ID 0824a754a8eb6533e96da42d1fc5c478638c04f4 # Parent 5c59c433b358cdbc52d1976883e50a507bd5ae8a * Ensure labels and their pixmaps get redrawn properly diff -r 5c59c433b358 -r 0824a754a8eb view/Pane.cpp --- 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) {