[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/workspace/ksysguard/gui/SensorDisplayLib
From:       John Tapsell <john.tapsell () kdemail ! net>
Date:       2009-10-25 10:22:14
Message-ID: 1256466134.330786.8372.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1040002 by johnflux:

Recalculate axis scale on a resize


 M  +5 -1      SignalPlotter.cc  


--- trunk/KDE/kdebase/workspace/ksysguard/gui/SensorDisplayLib/SignalPlotter.cc #1040001:1040002
@@ -586,7 +586,11 @@
     if(boundingBox.height() <= 2 || boundingBox.width() <= 2 ) return;
     p->setFont( mFont );
     int fontheight = p->fontMetrics().height();
-    mHorizontalLinesCount = qBound(0, (int)(boundingBox.height() / fontheight)-2, 4);
+    int newHorizontalLinesCount = qBound(0, (int)(boundingBox.height() / fontheight)-2, 4);
+    if(newHorizontalLinesCount != mHorizontalLinesCount) {
+        mHorizontalLinesCount = newHorizontalLinesCount;
+        calculateNiceRange();
+    }
 
     if(!onlyDrawPlotter) {
         QPen pen;
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic