diff options
| author | Adrian Boguszewski <adrbogus1@student.pg.gda.pl> | 2016-07-03 18:53:39 +0000 |
|---|---|---|
| committer | Adrian Boguszewski <adrbogus1@student.pg.gda.pl> | 2016-07-03 18:53:39 +0000 |
| commit | b3e8b69d72b193cffe4b5e1be228f63769b5398d (patch) | |
| tree | 96c38c7bf7df9a99e3fd3867378b41d4e89f4855 /src/ui/tools/tweak-tool.cpp | |
| parent | Added xmlNodes as range function (diff) | |
| parent | avoid zero SBasis curve. (Bug 1593963) (diff) | |
| download | inkscape-b3e8b69d72b193cffe4b5e1be228f63769b5398d.tar.gz inkscape-b3e8b69d72b193cffe4b5e1be228f63769b5398d.zip | |
Added items as a range function
(bzr r14954.1.13)
Diffstat (limited to 'src/ui/tools/tweak-tool.cpp')
| -rw-r--r-- | src/ui/tools/tweak-tool.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/tools/tweak-tool.cpp b/src/ui/tools/tweak-tool.cpp index 4da8060e2..658cf4617 100644 --- a/src/ui/tools/tweak-tool.cpp +++ b/src/ui/tools/tweak-tool.cpp @@ -153,7 +153,7 @@ void TweakTool::update_cursor (bool with_shift) { gchar *sel_message = NULL; if (!desktop->selection->isEmpty()) { - num = desktop->selection->items().size(); + num = (guint) boost::distance(desktop->selection->items()); sel_message = g_strdup_printf(ngettext("<b>%i</b> object selected","<b>%i</b> objects selected",num), num); } else { sel_message = g_strdup_printf("%s", _("<b>Nothing</b> selected")); @@ -1076,8 +1076,8 @@ sp_tweak_dilate (TweakTool *tc, Geom::Point event_p, Geom::Point p, Geom::Point double move_force = get_move_force(tc); double color_force = MIN(sqrt(path_force)/20.0, 1); - std::vector<SPItem*> items= selection->items(); - for(std::vector<SPItem*>::const_iterator i=items.begin();i!=items.end(); ++i){ + auto items= selection->items(); + for(auto i=items.begin();i!=items.end(); ++i){ SPItem *item = *i; if (is_color_mode (tc->mode)) { @@ -1185,7 +1185,7 @@ bool TweakTool::root_handler(GdkEvent* event) { guint num = 0; if (!desktop->selection->isEmpty()) { - num = desktop->selection->items().size(); + num = (guint) boost::distance(desktop->selection->items()); } if (num == 0) { this->message_context->flash(Inkscape::ERROR_MESSAGE, _("<b>Nothing selected!</b> Select objects to tweak.")); |
