summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/node-tool.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2015-05-08 17:26:29 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2015-05-08 17:26:29 +0000
commitf31b2c75e1313ccceeb6d33cc14aa545d4d370f9 (patch)
tree444b38fe397f34ee5c298ed0efd5cc9f49afb7cf /src/ui/tools/node-tool.cpp
parentMore helper/geom.h pruning. (diff)
parentcmake: Bring cmake installation in line with autotools (bug #1451481) (diff)
downloadinkscape-f31b2c75e1313ccceeb6d33cc14aa545d4d370f9.tar.gz
inkscape-f31b2c75e1313ccceeb6d33cc14aa545d4d370f9.zip
Merge from trunk
(bzr r14059.2.11)
Diffstat (limited to 'src/ui/tools/node-tool.cpp')
-rw-r--r--src/ui/tools/node-tool.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/ui/tools/node-tool.cpp b/src/ui/tools/node-tool.cpp
index a4b903960..ef00eaa40 100644
--- a/src/ui/tools/node-tool.cpp
+++ b/src/ui/tools/node-tool.cpp
@@ -410,10 +410,9 @@ void NodeTool::selection_changed(Inkscape::Selection *sel) {
std::set<ShapeRecord> shapes;
- GSList const *ilist = sel->itemList();
-
- for (GSList *i = const_cast<GSList*>(ilist); i; i = i->next) {
- SPObject *obj = static_cast<SPObject*>(i->data);
+ std::vector<SPItem*> items=sel->itemList();
+ for(std::vector<SPItem*>::const_iterator i=items.begin();i!=items.end();i++){
+ SPObject *obj = *i;
if (SP_IS_ITEM(obj)) {
gather_items(this, NULL, static_cast<SPItem*>(obj), SHAPE_ROLE_NORMAL, shapes);
@@ -658,9 +657,8 @@ void NodeTool::select_area(Geom::Rect const &sel, GdkEventButton *event) {
if (this->_multipath->empty()) {
// if multipath is empty, select rubberbanded items rather than nodes
Inkscape::Selection *selection = this->desktop->selection;
- GSList *items = this->desktop->getDocument()->getItemsInBox(this->desktop->dkey, sel);
+ std::vector<SPItem*> items = this->desktop->getDocument()->getItemsInBox(this->desktop->dkey, sel);
selection->setList(items);
- g_slist_free(items);
} else {
if (!held_shift(*event)) {
this->_selected_nodes->clear();