diff options
| author | Tomasz Boczkowski <penginsbacon@gmail.com> | 2015-05-02 09:43:24 +0000 |
|---|---|---|
| committer | Tomasz Boczkowski <penginsbacon@gmail.com> | 2015-05-02 09:43:24 +0000 |
| commit | 4ae263b8d394775ff631efaacc835346af1ffdae (patch) | |
| tree | 8c54527cb2698ade852a3286e84692fc29b74ad8 /src/ui/dialog/clonetiler.cpp | |
| parent | merged gtk3 compile fix (diff) | |
| parent | sp-text: Whitespace cleanup (diff) | |
| download | inkscape-4ae263b8d394775ff631efaacc835346af1ffdae.tar.gz inkscape-4ae263b8d394775ff631efaacc835346af1ffdae.zip | |
merge with trunk
(bzr r14059.1.12)
Diffstat (limited to 'src/ui/dialog/clonetiler.cpp')
| -rw-r--r-- | src/ui/dialog/clonetiler.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/ui/dialog/clonetiler.cpp b/src/ui/dialog/clonetiler.cpp index bd3ad0254..f84a2ffd6 100644 --- a/src/ui/dialog/clonetiler.cpp +++ b/src/ui/dialog/clonetiler.cpp @@ -1359,7 +1359,7 @@ void CloneTiler::clonetiler_change_selection(Inkscape::Selection *selection, Gtk return; } - if (g_slist_length ((GSList *) selection->itemList()) > 1) { + if (selection->itemList().size() > 1) { gtk_widget_set_sensitive (buttons, FALSE); gtk_label_set_markup (GTK_LABEL(status), _("<small>More than one object selected.</small>")); return; @@ -2096,7 +2096,7 @@ void CloneTiler::clonetiler_unclump(GtkWidget */*widget*/, void *) Inkscape::Selection *selection = desktop->getSelection(); // check if something is selected - if (selection->isEmpty() || g_slist_length((GSList *) selection->itemList()) > 1) { + if (selection->isEmpty() || selection->itemList().size() > 1) { desktop->getMessageStack()->flash(Inkscape::WARNING_MESSAGE, _("Select <b>one object</b> whose tiled clones to unclump.")); return; } @@ -2104,20 +2104,18 @@ void CloneTiler::clonetiler_unclump(GtkWidget */*widget*/, void *) SPObject *obj = selection->singleItem(); SPObject *parent = obj->parent; - GSList *to_unclump = NULL; // not including the original + std::vector<SPItem*> to_unclump; // not including the original for (SPObject *child = parent->firstChild(); child != NULL; child = child->next) { if (clonetiler_is_a_clone_of (child, obj)) { - to_unclump = g_slist_prepend (to_unclump, child); + to_unclump.push_back((SPItem*)child); } } desktop->getDocument()->ensureUpToDate(); - + reverse(to_unclump.begin(),to_unclump.end()); unclump (to_unclump); - g_slist_free (to_unclump); - DocumentUndo::done(desktop->getDocument(), SP_VERB_DIALOG_CLONETILER, _("Unclump tiled clones")); } @@ -2147,7 +2145,7 @@ void CloneTiler::clonetiler_remove(GtkWidget */*widget*/, GtkWidget *dlg, bool d Inkscape::Selection *selection = desktop->getSelection(); // check if something is selected - if (selection->isEmpty() || g_slist_length((GSList *) selection->itemList()) > 1) { + if (selection->isEmpty() || selection->itemList().size() > 1) { desktop->getMessageStack()->flash(Inkscape::WARNING_MESSAGE, _("Select <b>one object</b> whose tiled clones to remove.")); return; } @@ -2225,7 +2223,7 @@ void CloneTiler::clonetiler_apply(GtkWidget */*widget*/, GtkWidget *dlg) } // Check if more than one object is selected. - if (g_slist_length((GSList *) selection->itemList()) > 1) { + if (selection->itemList().size() > 1) { desktop->getMessageStack()->flash(Inkscape::ERROR_MESSAGE, _("If you want to clone several objects, <b>group</b> them and <b>clone the group</b>.")); return; } |
