[Kst] extragear/graphics/kst/src/libkstapp
Andrew Walker
arwalker at sumusltd.com
Fri May 5 00:02:59 CEST 2006
SVN commit 537491 by arwalker:
CCBUG:124090 More instances where view manager must be updated
M +8 -0 ksttoplevelview.cpp
M +1 -0 kstviewwidget.cpp
--- trunk/extragear/graphics/kst/src/libkstapp/ksttoplevelview.cpp #537490:537491
@@ -972,12 +972,15 @@
// something that includes none of those. This is most likely the parent of
// 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();
container->appendChild(_pressTarget);
+ updateViewManager = true;
}
_pressTarget->move(obj.topLeft() + objOffset);
for (KstViewObjectList::Iterator i = _selectionList.begin(); i != _selectionList.end(); ++i) {
@@ -986,10 +989,15 @@
if (container != thisObj && !container->children().contains(thisObj)) {
thisObj->detach();
container->appendChild(thisObj);
+ updateViewManager = true;
}
thisObj->move(_pressTarget->position() + thisObj->geometry().topLeft() - old.topLeft());
}
}
+
+ if (updateViewManager) {
+ KstApp::inst()->updateViewManager(true);
+ }
_onGrid = false;
}
--- trunk/extragear/graphics/kst/src/libkstapp/kstviewwidget.cpp #537490:537491
@@ -432,6 +432,7 @@
// FIXME: support both copy and move
KstApp::inst()->paste(e, viewObject());
e->acceptAction(true);
+ KstApp::inst()->updateViewManager(true);
_view->paint(KstPainter::P_PAINT);
} else if (_view->viewMode() != KstTopLevelView::LayoutMode) {
KstViewObjectPtr vo = findChildFor(e->pos());
More information about the Kst
mailing list