diff options
| author | Thomas Holder <thomas@thomas-holder.de> | 2019-10-18 17:46:49 +0000 |
|---|---|---|
| committer | Thomas Holder <thomas@thomas-holder.de> | 2019-10-18 17:46:49 +0000 |
| commit | 3f4989722b26a62535e05f01400f044e86689141 (patch) | |
| tree | 4ac71aea668b0d8c82e80475237994a55868031e /src/document.cpp | |
| parent | Make href and unhref member functions of SPObject. (diff) | |
| download | inkscape-3f4989722b26a62535e05f01400f044e86689141.tar.gz inkscape-3f4989722b26a62535e05f01400f044e86689141.zip | |
fix #476 ignore hidden layers when selecting
Diffstat (limited to '')
| -rw-r--r-- | src/document.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/document.cpp b/src/document.cpp index 4ce3fe495..ccea1f583 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -1319,6 +1319,14 @@ static std::vector<SPItem*> &find_items_in_area(std::vector<SPItem*> &s, for (auto& o: group->children) { if (SPItem *item = dynamic_cast<SPItem *>(&o)) { + if (!take_insensitive && item->isLocked()) { + continue; + } + + if (!take_hidden && item->isHidden()) { + continue; + } + if (SPGroup * childgroup = dynamic_cast<SPGroup *>(item)) { bool is_layer = childgroup->effectiveLayerMode(dkey) == SPGroup::LAYER; if (is_layer || (enter_groups)) { @@ -1329,10 +1337,7 @@ static std::vector<SPItem*> &find_items_in_area(std::vector<SPItem*> &s, } } Geom::OptRect box = item->documentVisualBounds(); - if (box && test(area, *box) - && (take_insensitive || !item->isLocked()) - && (take_hidden || !item->isHidden())) - { + if (box && test(area, *box)) { s.push_back(item); } } |
