Fix regression in pattern reference selection

Reference selection in the GUI was accidentially changed to only
allow specific types of objects, preventing e.g. selection of a DatumPlane
for mirroring.

This restores the previous functionality.
This commit is contained in:
André Althaus
2024-03-12 16:10:01 +01:00
committed by Yorik van Havre
parent 67a31fa948
commit 35ca189589
3 changed files with 6 additions and 9 deletions

View File

@@ -134,7 +134,7 @@ void TaskMirroredParameters::onSelectionChanged(const Gui::SelectionChanges& msg
if (originalSelected(msg)) {
exitSelectionMode();
}
else if (selectionMode == SelectionMode::Reference) {
else {
auto pcMirrored = static_cast<PartDesign::Mirrored*>(getObject());
std::vector<std::string> mirrorPlanes;
@@ -144,7 +144,7 @@ void TaskMirroredParameters::onSelectionChanged(const Gui::SelectionChanges& msg
return;
}
if (selObj->isDerivedFrom<App::Plane>()) {
if (selectionMode == SelectionMode::Reference || selObj->isDerivedFrom<App::Plane>()) {
setupTransaction();
pcMirrored->MirrorPlane.setValue(selObj, mirrorPlanes);
recomputeFeature();