[Kst] extragear/graphics/kst/kst

George Staikos staikos at kde.org
Fri Nov 25 05:42:18 CET 2005


SVN commit 483099 by staikos:

Selection rect can't be drawn from paint because it affects the clipper.
Remove for now which fixes lots of corruption.  Will re-add later in a different
way.
A couple minor cleanups.  Also remove a redundant check in directionFor().


 M  +5 -10     kstviewobject.cpp  


--- trunk/extragear/graphics/kst/kst/kstviewobject.cpp #483098:483099
@@ -342,14 +342,8 @@
     }
   }
 
-  p.setClipRegion(oldRegion);
-
-  if (isSelected()) {
-    //kstdDebug() << "Object " << tagName() << " is selected" << endl;
-    drawSelectRect(p);
-  }
-
   p.setClipping(hadClipping);
+  p.setClipRegion(oldRegion);
   p.restore();
   p.flush();
   setDirty(false);
@@ -753,13 +747,12 @@
   }
 
   KstViewObjectList::Iterator i = _children.end();
-  KstViewObjectPtr rc;
   for (--i; ; --i) {
     if ((*i)->tagName() == name) {
       return *i;
     }
     if (recursive) {
-      rc = (*i)->findChild(name, recursive);
+      KstViewObjectPtr rc = (*i)->findChild(name, recursive);
       if (rc) {
         return rc;
       }
@@ -792,7 +785,7 @@
           if ((*i)->clipRegion().contains(pos)) {
             obj = *i;
           } else if (borderForTransparent && (*i)->geometry().contains(pos)) {
-            QRect g = (*i)->geometry();
+            const QRect g((*i)->geometry());
             if ((pos.x() >= g.left() && pos.x() <= g.left() + KST_RESIZE_BORDER_W) ||
                 (pos.x() <= g.right() && pos.x() >= g.right() - KST_RESIZE_BORDER_W) ||
                 (pos.y() >= g.top() && pos.y() <= g.top() + KST_RESIZE_BORDER_W) ||
@@ -1551,10 +1544,12 @@
 
 
 signed int KstViewObject::directionFor(const QPoint& pos) {
+#if 0
   // no hotpoints if object is not selected - can only move it
   if (!isSelected()) {
     return NONE;  
   }
+#endif
   
   signed int direction = NONE;
   


More information about the Kst mailing list