[Kst] [Bug 116847] Problem with X/Y Mouse Zoom mode

George Staikos staikos at kde.org
Thu Nov 24 01:24:34 CET 2005


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=116847         
staikos kde org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From staikos kde org  2005-11-24 01:24 -------
SVN commit 482739 by staikos:

Fix Matt's bug and basically put Andrew's patch back with the bounds clipping
moved into kstviewobject instead.  It's a bit slower, but much faster than
painting regions we don't need to paint.  There are still issues with the
guidelines, but they were always there and not related to any of these bugs.
Still can't reproduce what Andrew sees though, so I don't know for sure that
it fixes it, and even then, why.
BUG: 116847


 M  +1 -1      kst2dplot.cpp  
 M  +1 -5      ksttoplevelview.cpp  
 M  +5 -6      kstviewobject.cpp  
 M  +2 -2      kstviewwidget.cpp  


--- trunk/extragear/graphics/kst/kst/kst2dplot.cpp #482738:482739
 @ -2236,7 +2236,7  @
     _oldAlignment = alignment;
     _oldSize = sizeNew;
 
-    kstdDebug() << " -> paint plot " << tagName() << " with clipRegion: " << p.clipRegion() << endl;
+    //kstdDebug() << " -> paint plot " << tagName() << " with clipRegion: " << p.clipRegion() << endl;
     _buffer.paintInto(p, geometry());
     drawCursorPos(p);
     updateTieBox(p);
--- trunk/extragear/graphics/kst/kst/ksttoplevelview.cpp #482738:482739
 @ -149,11 +149,7  @
   QTime t;
   t.start();
 #endif
-  if (bounds.isNull()) {
-    p.setClipRegion(clipRegion());
-  } else {
-    p.setClipRegion(bounds);
-  }
+  p.setClipRegion(clipRegion());
   KstViewObject::paint(type, p, bounds);
 #ifdef BENCHMARK
   int x = t.elapsed();
--- trunk/extragear/graphics/kst/kst/kstviewobject.cpp #482738:482739
 @ -324,7 +324,11  @
         t.start();
 #endif
         (*i)->_lastClipRegion = clipRegion;
-        p.setClipRegion(clipRegion);
+        if (nullBounds) {
+          p.setClipRegion(clipRegion);
+        } else {
+          p.setClipRegion(clipRegion.intersect(bounds));
+        }
         (*i)->paint(type, p, bounds);
         clipRegion -= (*i)->clipRegion();
 #ifdef BENCHMARK
 @ -340,11 +344,6  @
 
   p.setClipRegion(oldRegion);
 
-  if (_focus) {
-    //kstdDebug() << "Object " << tagName() << " has focus" << endl;
-    //drawFocusRect(p);
-  }
-
   if (isSelected()) {
     //kstdDebug() << "Object " << tagName() << " is selected" << endl;
     drawSelectRect(p);
--- trunk/extragear/graphics/kst/kst/kstviewwidget.cpp #482738:482739
 @ -354,10 +354,10  @
   if (e) {  // Resize/expose/etc triggered by X11
     QRegion r = e->region();
     if (r.isEmpty()) {
-      kstdDebug() << "Paint event with NO region" << endl;
+      //kstdDebug() << "Paint event with NO region" << endl;
       _view->paint(_nextUpdate);
     } else {
-      kstdDebug() << "Paint event with region " << e->region() << endl;
+      //kstdDebug() << "Paint event with region " << e->region() << endl;
       _view->paint(_nextUpdate, e->region());
     }
     _nextUpdate = P_PAINT;


More information about the Kst mailing list