diff options
| author | bulia byak <buliabyak@gmail.com> | 2006-03-22 15:01:15 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2006-03-22 15:01:15 +0000 |
| commit | 3998a11ea19189ed8736c0692a1cf6d03728163e (patch) | |
| tree | 94ed32208221a55fa840685999daff676a8738f5 /src/selection.cpp | |
| parent | Mask/Clippath transformations on masking/unmasking (diff) | |
| download | inkscape-3998a11ea19189ed8736c0692a1cf6d03728163e.tar.gz inkscape-3998a11ea19189ed8736c0692a1cf6d03728163e.zip | |
more information on objects selected in groups
(bzr r270)
Diffstat (limited to 'src/selection.cpp')
| -rw-r--r-- | src/selection.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/selection.cpp b/src/selection.cpp index 09f6a18e3..87e0788d8 100644 --- a/src/selection.cpp +++ b/src/selection.cpp @@ -435,6 +435,20 @@ guint Selection::numberOfLayers() { return ret; } +guint Selection::numberOfParents() { + GSList const *items = const_cast<Selection *>(this)->itemList(); + GSList *parents = NULL; + for (GSList const *iter = items; iter != NULL; iter = iter->next) { + SPObject *parent = SP_OBJECT_PARENT(iter->data); + if (g_slist_find (parents, parent) == NULL) { + parents = g_slist_prepend (parents, parent); + } + } + guint ret = g_slist_length (parents); + g_slist_free (parents); + return ret; +} + } /* |
