Navigation Menu

Skip to content

Commit

Permalink
Gui: fix SelectionSingleton::checkSelection()
Browse files Browse the repository at this point in the history
This affects sub-object selection detection
  • Loading branch information
realthunder authored and wwmayer committed Oct 13, 2019
1 parent bea009c commit bf27b11
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Gui/Selection.cpp
Expand Up @@ -1608,9 +1608,13 @@ int SelectionSingleton::checkSelection(const char *pDocName, const char *pObject
}
if(!selList)
selList = &_SelList;

if(!pSubName)
pSubName = "";

for (auto &s : *selList) {
if (s.DocName==pDocName && s.FeatName==sel.FeatName) {
if(!pSubName || s.SubName==pSubName)
if(s.SubName==pSubName)
return 1;
if(resolve>1 && boost::starts_with(s.SubName,prefix))
return 1;
Expand All @@ -1620,7 +1624,7 @@ int SelectionSingleton::checkSelection(const char *pDocName, const char *pObject
for(auto &s : *selList) {
if(s.pResolvedObject != sel.pResolvedObject)
continue;
if(!pSubName)
if(!pSubName[0])
return 1;
if(s.elementName.first.size()) {
if(s.elementName.first == sel.elementName.first)
Expand Down

0 comments on commit bf27b11

Please sign in to comment.