summaryrefslogtreecommitdiffstats
path: root/src/extension/implementation
diff options
context:
space:
mode:
authorAdrian Boguszewski <adrbogus1@student.pg.gda.pl>2016-07-03 18:53:39 +0000
committerAdrian Boguszewski <adrbogus1@student.pg.gda.pl>2016-07-03 18:53:39 +0000
commitb3e8b69d72b193cffe4b5e1be228f63769b5398d (patch)
tree96c38c7bf7df9a99e3fd3867378b41d4e89f4855 /src/extension/implementation
parentAdded xmlNodes as range function (diff)
parentavoid zero SBasis curve. (Bug 1593963) (diff)
downloadinkscape-b3e8b69d72b193cffe4b5e1be228f63769b5398d.tar.gz
inkscape-b3e8b69d72b193cffe4b5e1be228f63769b5398d.zip
Added items as a range function
(bzr r14954.1.13)
Diffstat (limited to 'src/extension/implementation')
-rw-r--r--src/extension/implementation/implementation.cpp4
-rw-r--r--src/extension/implementation/script.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/extension/implementation/implementation.cpp b/src/extension/implementation/implementation.cpp
index eb1213a84..6139ed367 100644
--- a/src/extension/implementation/implementation.cpp
+++ b/src/extension/implementation/implementation.cpp
@@ -46,10 +46,10 @@ Gtk::Widget *Implementation::prefs_effect(Inkscape::Extension::Effect *module, I
SPDocument * current_document = view->doc();
- std::vector<SPItem*> selected = ((SPDesktop *) view)->getSelection()->items();
+ auto selected = ((SPDesktop *) view)->getSelection()->items();
Inkscape::XML::Node const* first_select = NULL;
if (!selected.empty()) {
- const SPItem * item = selected[0];
+ const SPItem * item = selected.front();
first_select = item->getRepr();
}
diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp
index 0acc99aed..459b1a196 100644
--- a/src/extension/implementation/script.cpp
+++ b/src/extension/implementation/script.cpp
@@ -689,9 +689,9 @@ void Script::effect(Inkscape::Extension::Effect *module,
return;
}
- std::vector<SPItem*> selected =
+ auto selected =
desktop->getSelection()->items(); //desktop should not be NULL since doc was checked and desktop is a casted pointer
- for(std::vector<SPItem*>::const_iterator x = selected.begin(); x != selected.end(); ++x){
+ for(auto x = selected.begin(); x != selected.end(); ++x){
Glib::ustring selected_id;
selected_id += "--id=";
selected_id += (*x)->getId();