[Kst] [Bug 125328] off by one error in selection in layout mode

Andrew Walker arwalker at sumusltd.com
Fri May 5 02:26:32 CEST 2006


------- 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=125328         
arwalker sumusltd com changed:

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



------- Additional Comments From arwalker sumusltd com  2006-05-05 02:26 -------
SVN commit 537517 by arwalker:

BUG:125328 Set the cursor correctly even when switching focus objects

 M  +11 -20    ksttoplevelview.cpp  


--- trunk/extragear/graphics/kst/src/libkstapp/ksttoplevelview.cpp #537516:537517
 @ -210,33 +210,24  @
     }
   }
   if (p) {
-    setCursorFor(pos, p);
     if (p->focused()) {
+      setCursorFor(pos, p);
       _focusOn = true; // just in case - seems to be false on occasion
       return;
     }
+    p->setFocus(true);
     if (_focusOn) { // something else has the focus, clear it
-      p->setFocus(true);
       clearFocus();
-      KstPainter painter;
-      painter.begin(_w);
-      painter.setRasterOp(Qt::NotROP);
-      painter.setPen(QPen(Qt::black, 0, Qt::SolidLine));
-      painter.setBrush(Qt::NoBrush);
-      p->drawFocusRect(painter);
-      painter.end();
-      _focusOn = true;
-    } else {
-      p->setFocus(true);
-      KstPainter painter;
-      painter.begin(_w);
-      painter.setRasterOp(Qt::NotROP);
-      painter.setPen(QPen(Qt::black, 0, Qt::SolidLine));
-      painter.setBrush(Qt::NoBrush);
-      p->drawFocusRect(painter);
-      painter.end();
-      _focusOn = true;
     }
+    setCursorFor(pos, p);
+    KstPainter painter;
+    painter.begin(_w);
+    painter.setRasterOp(Qt::NotROP);
+    painter.setPen(QPen(Qt::black, 0, Qt::SolidLine));
+    painter.setBrush(Qt::NoBrush);
+    p->drawFocusRect(painter);
+    painter.end();
+    _focusOn = true;
     _hoverFocus = p;
   } else {
     clearFocus();


More information about the Kst mailing list