[Kst] branches/work/kst/1.5/kst/src/libkstapp

Andrew Walker arwalker at sumusltd.com
Sun May 20 20:42:27 CEST 2007


SVN commit 666734 by arwalker:

BUG:123561 Invalidate the clipping region for the object being moved and its old parent so that both are redrawn correctly.

 M  +8 -3      ksttoplevelview.cpp  


--- branches/work/kst/1.5/kst/src/libkstapp/ksttoplevelview.cpp #666733:666734
@@ -988,7 +988,7 @@
       // we are resizing rectangular object(s)
       releasePressLayoutModeResize(pos, shift);
     }
-    _pressTarget->setFocus(true);   
+    _pressTarget->setFocus(true);
   } else { 
     // selecting objects using rubber band
     releasePressLayoutModeSelect(pos, shift);
@@ -1026,12 +1026,15 @@
   // the returned object in that case.
   KstViewObjectPtr container = findDeepestChild(obj);
   bool updateViewManager = false;
-  
+
   if (!container) {
     container = this;
   }
   if (container != _pressTarget && !container->children().contains(_pressTarget)) {
-    _pressTarget->detach();
+    if (_pressTarget->parent()) {
+      _pressTarget->parent()->invalidateClipRegion();
+      _pressTarget->detach();
+    }
     container->appendChild(_pressTarget);
     updateViewManager = true;
   }
@@ -1047,10 +1050,12 @@
       thisObj->move(_pressTarget->position() + thisObj->geometry().topLeft() - old.topLeft());
     }
   }
+  container->invalidateClipRegion();
   
   if (updateViewManager) {
     KstApp::inst()->updateViewManager(true);
   }
+
   _onGrid = false;
 }
 


More information about the Kst mailing list