From 193b25a53c51a36fe9538e03203b0054c8cfc355 Mon Sep 17 00:00:00 2001 From: mc <> Date: Wed, 18 Feb 2015 02:02:37 +0100 Subject: Just... some... more... lines... (bzr r13922.1.2) --- src/ui/tools/node-tool.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/ui/tools/node-tool.cpp') diff --git a/src/ui/tools/node-tool.cpp b/src/ui/tools/node-tool.cpp index caec901a6..46c978c84 100644 --- a/src/ui/tools/node-tool.cpp +++ b/src/ui/tools/node-tool.cpp @@ -420,10 +420,9 @@ void NodeTool::selection_changed(Inkscape::Selection *sel) { std::set shapes; - GSList const *ilist = sel->itemList(); - - for (GSList *i = const_cast(ilist); i; i = i->next) { - SPObject *obj = static_cast(i->data); + SelContainer items=sel->itemList(); + for(SelContainer::const_iterator i=items.begin();i!=items.end();i++){ + SPObject *obj = static_cast(*i); if (SP_IS_ITEM(obj)) { gather_items(this, NULL, static_cast(obj), SHAPE_ROLE_NORMAL, shapes); @@ -668,9 +667,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); + SelContainer 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(); -- cgit v1.2.3 From 5fd00cab14d48beaf2279a2b8f3ad5b02b76c87b Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Thu, 19 Feb 2015 04:25:21 +0100 Subject: Put a few std::vector (bzr r13922.1.5) --- src/ui/tools/node-tool.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ui/tools/node-tool.cpp') diff --git a/src/ui/tools/node-tool.cpp b/src/ui/tools/node-tool.cpp index 46c978c84..6ddb379cc 100644 --- a/src/ui/tools/node-tool.cpp +++ b/src/ui/tools/node-tool.cpp @@ -420,8 +420,8 @@ void NodeTool::selection_changed(Inkscape::Selection *sel) { std::set shapes; - SelContainer items=sel->itemList(); - for(SelContainer::const_iterator i=items.begin();i!=items.end();i++){ + std::vector items=sel->itemList(); + for(std::vector::const_iterator i=items.begin();i!=items.end();i++){ SPObject *obj = static_cast(*i); if (SP_IS_ITEM(obj)) { @@ -667,7 +667,7 @@ 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; - SelContainer items = this->desktop->getDocument()->getItemsInBox(this->desktop->dkey, sel); + std::vector items = this->desktop->getDocument()->getItemsInBox(this->desktop->dkey, sel); selection->setList(items); } else { if (!held_shift(*event)) { -- cgit v1.2.3 From 9bdc157f705ca61516e599cb416580283d21ec35 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Fri, 27 Feb 2015 04:21:48 +0100 Subject: more cast cleanup (bzr r13922.1.11) --- src/ui/tools/node-tool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ui/tools/node-tool.cpp') diff --git a/src/ui/tools/node-tool.cpp b/src/ui/tools/node-tool.cpp index 6ddb379cc..374386686 100644 --- a/src/ui/tools/node-tool.cpp +++ b/src/ui/tools/node-tool.cpp @@ -422,7 +422,7 @@ void NodeTool::selection_changed(Inkscape::Selection *sel) { std::vector items=sel->itemList(); for(std::vector::const_iterator i=items.begin();i!=items.end();i++){ - SPObject *obj = static_cast(*i); + SPObject *obj = *i; if (SP_IS_ITEM(obj)) { gather_items(this, NULL, static_cast(obj), SHAPE_ROLE_NORMAL, shapes); -- cgit v1.2.3