[TechDraw] Fix app selection not reflecting Qt selection

This commit is contained in:
pavltom
2023-11-16 09:52:50 +01:00
committed by WandererFan
parent 886c683f65
commit 87e2c36dda

View File

@@ -957,8 +957,10 @@ bool MDIViewPage::compareSelections(std::vector<Gui::SelectionObject> treeSel,
}
int treeCount = 0;
int subCount = 0;
int sceneCount = 0;
int ppCount = 0;
std::vector<std::string> treeNames;
std::vector<std::string> sceneNames;
@@ -966,6 +968,7 @@ bool MDIViewPage::compareSelections(std::vector<Gui::SelectionObject> treeSel,
if (tn.getObject()->isDerivedFrom(TechDraw::DrawView::getClassTypeId())) {
std::string s = tn.getObject()->getNameInDocument();
treeNames.push_back(s);
subCount += tn.getSubNames().size();
}
}
std::sort(treeNames.begin(), treeNames.end());
@@ -1017,7 +1020,7 @@ bool MDIViewPage::compareSelections(std::vector<Gui::SelectionObject> treeSel,
}
//Objects all match, check subs
if (treeCount != ppCount) {
if (subCount != ppCount) {
return false;
}