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

@@ -221,7 +221,7 @@ void TaskPolarPatternParameters::onSelectionChanged(const Gui::SelectionChanges&
if (originalSelected(msg)) {
exitSelectionMode();
}
else if (selectionMode == SelectionMode::Reference) {
else {
auto pcPolarPattern = static_cast<PartDesign::PolarPattern*>(getObject());
std::vector<std::string> axes;
@@ -231,8 +231,7 @@ void TaskPolarPatternParameters::onSelectionChanged(const Gui::SelectionChanges&
return;
}
if (selObj->isDerivedFrom<App::Line>() || selObj->isDerivedFrom<Part::Feature>()
|| selObj->isDerivedFrom<PartDesign::Line>()) {
if (selectionMode == SelectionMode::Reference || selObj->isDerivedFrom<App::Line>()) {
setupTransaction();
pcPolarPattern->Axis.setValue(selObj, axes);
recomputeFeature();