Summary: | Delete keypresses sometimes do not work. | ||
---|---|---|---|
Product: | [Applications] kst | Reporter: | Duncan Hanson <duncan.hanson> |
Component: | general | Assignee: | Duncan Hanson <duncan.hanson> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 1.x | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Duncan Hanson
2006-05-11 23:12:15 UTC
SVN commit 539919 by dhanson: BUG:127177 rewrote KstTopLevelView::deleteSelectedObjects so that deep children can be removed. M +13 -9 ksttoplevelview.cpp --- trunk/extragear/graphics/kst/src/libkstapp/ksttoplevelview.cpp #539918:539919 @@ -1601,18 +1601,22 @@ void KstTopLevelView::deleteSelectedObjects() { QValueList<KstViewObject*> toBeDeleted; - for (KstViewObjectList::Iterator it = _children.begin(); it != _children.end(); ++it) { - if ((*it)->isSelected()) { - toBeDeleted.push_front(*it); - } - } + + _selectionList.clear(); + recursivelyQuery(&KstViewObject::isSelected, _selectionList, false); + + KstViewObject *selection; - clearFocus(); + while (!_selectionList.isEmpty()) { + selection = _selectionList.front(); - while (!toBeDeleted.isEmpty()) { - removeChild(toBeDeleted.front()); - toBeDeleted.pop_front(); + if (selection->parent()) { + selection->parent()->removeChild(selection); + } + _selectionList.pop_front(); } + + clearFocus(); paint(KstPainter::P_PAINT); } |