diff options
| author | Michael Soegtrop <MSoegtrop@yahoo.de> | 2017-06-05 13:56:11 +0000 |
|---|---|---|
| committer | Michael Soegtrop <MSoegtrop@yahoo.de> | 2017-06-05 13:56:11 +0000 |
| commit | 7ee81350c73388881e60a59928d26764b7172c9b (patch) | |
| tree | b561a4dbbacd7eecbdbae3fa220a353375ccecf8 /src/ui/widget/layer-selector.cpp | |
| parent | updated to trunk (diff) | |
| parent | [Bug #1695016] Xaml export misses some radialGradients. (diff) | |
| download | inkscape-7ee81350c73388881e60a59928d26764b7172c9b.tar.gz inkscape-7ee81350c73388881e60a59928d26764b7172c9b.zip | |
merged with latest version of lpe-bool and trunk
(bzr r14862.2.3)
Diffstat (limited to 'src/ui/widget/layer-selector.cpp')
| -rw-r--r-- | src/ui/widget/layer-selector.cpp | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/src/ui/widget/layer-selector.cpp b/src/ui/widget/layer-selector.cpp index 1a9ce617f..4432a6e09 100644 --- a/src/ui/widget/layer-selector.cpp +++ b/src/ui/widget/layer-selector.cpp @@ -11,7 +11,7 @@ */ #ifdef HAVE_CONFIG_H -# include "config.h" +#include <config.h> #endif #include <cstring> @@ -19,15 +19,15 @@ #include "ui/dialog/layer-properties.h" #include <glibmm/i18n.h> +#include <boost/range/adaptor/filtered.hpp> +#include <boost/range/adaptor/reversed.hpp> #include "desktop.h" #include "document.h" #include "document-undo.h" #include "layer-manager.h" -#include "sp-item.h" #include "ui/icon-names.h" -#include "ui/widget/layer-selector.h" #include "util/filter-list.h" #include "util/reverse-list.h" #include "verbs.h" @@ -348,27 +348,17 @@ void LayerSelector::_buildSiblingEntries( unsigned depth, SPObject &parent, Inkscape::Util::List<SPObject &> hierarchy ) { - using Inkscape::Util::List; using Inkscape::Util::rest; - using Inkscape::Util::reverse_list_in_place; - using Inkscape::Util::filter_list; - Inkscape::Util::List<SPObject &> siblings( - reverse_list_in_place( - filter_list<SPObject::SiblingIterator>( - is_layer(_desktop), parent.firstChild(), NULL - ) - ) - ); + auto siblings = parent.children | boost::adaptors::filtered(is_layer(_desktop)) | boost::adaptors::reversed; SPObject *layer( hierarchy ? &*hierarchy : NULL ); - while (siblings) { - _buildEntry(depth, *siblings); - if ( &*siblings == layer ) { + for (auto& sib: siblings) { + _buildEntry(depth, sib); + if ( &sib == layer ) { _buildSiblingEntries(depth+1, *layer, rest(hierarchy)); } - ++siblings; } } |
