diff options
Diffstat (limited to 'src/widgets/paint-selector.cpp')
| -rw-r--r-- | src/widgets/paint-selector.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/widgets/paint-selector.cpp b/src/widgets/paint-selector.cpp index 846ded511..602cad3c3 100644 --- a/src/widgets/paint-selector.cpp +++ b/src/widgets/paint-selector.cpp @@ -844,10 +844,10 @@ ink_pattern_list_get (SPDocument *source) return NULL; GSList *pl = NULL; - GSList const *patterns = source->getResourceList("pattern"); - for (GSList *l = const_cast<GSList *>(patterns); l != NULL; l = l->next) { - if (SP_PATTERN(l->data) == SP_PATTERN(l->data)->rootPattern()) { // only if this is a root pattern - pl = g_slist_prepend(pl, l->data); + std::set<SPObject *> patterns = source->getResourceList("pattern"); + for (std::set<SPObject *>::const_iterator it = patterns.begin(); it != patterns.end(); ++it) { + if (SP_PATTERN(*it) == SP_PATTERN(*it)->rootPattern()) { // only if this is a root pattern + pl = g_slist_prepend(pl, *it); } } @@ -972,7 +972,7 @@ ink_pattern_menu(GtkWidget *combo) } - // Select the first item that is not a seperator + // Select the first item that is not a separator if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL(store), &iter)) { gboolean sep = false; gtk_tree_model_get(GTK_TREE_MODEL(store), &iter, COMBO_COL_SEP, &sep, -1); |
