Merge pull request #16558 from CalligaroV/toponaming-sketcher-ViewProviderSketch-addSelection2-call-convertSubName

Sketcher/Toponaming: call SketchObject::convertSubName() in Gui selections
This commit is contained in:
Yorik van Havre
2024-09-16 18:01:23 +02:00
committed by GitHub
2 changed files with 11 additions and 3 deletions

View File

@@ -1677,8 +1677,11 @@ void TaskSketcherElements::onListWidgetElementsItemPressed(QListWidgetItem* it)
selectVertex(item->isMidPointSelected, item->MidVertex);
}
if (!elementSubNames.empty()) {
Gui::Selection().addSelections(doc_name.c_str(), obj_name.c_str(), elementSubNames);
for (const auto& elementSubName : elementSubNames) {
Gui::Selection().addSelection2(
doc_name.c_str(),
obj_name.c_str(),
sketchView->getSketchObject()->convertSubName(elementSubName).c_str());
}
this->blockSelection(block);

View File

@@ -3875,7 +3875,12 @@ bool ViewProviderSketch::addSelection(const std::string& subNameSuffix, float x,
bool ViewProviderSketch::addSelection2(const std::string& subNameSuffix, float x, float y, float z)
{
return Gui::Selection().addSelection2(
editDocName.c_str(), editObjName.c_str(), (editSubName + subNameSuffix).c_str(), x, y, z);
editDocName.c_str(),
editObjName.c_str(),
(editSubName + getSketchObject()->convertSubName(subNameSuffix)).c_str(),
x,
y,
z);
}
bool ViewProviderSketch::setPreselect(const std::string& subNameSuffix, float x, float y, float z)