PartDesign: disable final model while selecting on dressups (fillet/chamfer)
Co-authored-by: Kacper Donat <kacper@kadet.net>
This commit is contained in:
committed by
Kacper Donat
parent
6c89660c8b
commit
01b8382f24
@@ -135,7 +135,7 @@ void TaskDressUpParameters::addAllEdges(QListWidget* widget)
|
||||
if (!base) {
|
||||
return;
|
||||
}
|
||||
int count = Part::Feature::getTopoShape(base, Part::ShapeOption::ResolveLink
|
||||
int count = Part::Feature::getTopoShape(base, Part::ShapeOption::ResolveLink
|
||||
| Part::ShapeOption::Transform).countSubShapes(TopAbs_EDGE);
|
||||
auto subValues = pcDressUp->Base.getSubValues(false);
|
||||
std::size_t len = subValues.size();
|
||||
@@ -398,6 +398,12 @@ void TaskDressUpParameters::setSelectionMode(selectionModes mode)
|
||||
|
||||
// remove any highlights and selections
|
||||
DressUpView->highlightReferences(false);
|
||||
|
||||
if (previouslyShownViewProvider != nullptr) {
|
||||
// restore the previously shown view provider
|
||||
previouslyShownViewProvider->show();
|
||||
previouslyShownViewProvider = nullptr;
|
||||
}
|
||||
}
|
||||
else {
|
||||
AllowSelectionFlags allow;
|
||||
@@ -406,6 +412,11 @@ void TaskDressUpParameters::setSelectionMode(selectionModes mode)
|
||||
Gui::Selection().addSelectionGate(new ReferenceSelection(this->getBase(), allow));
|
||||
|
||||
DressUpView->highlightReferences(true);
|
||||
|
||||
// selection must come from the previous feature, we also need to remember the currently
|
||||
// shown so we can restore it later
|
||||
previouslyShownViewProvider = DressUpView->getBodyViewProvider()->getShownViewProvider();
|
||||
DressUpView->showPreviousFeature(true);
|
||||
}
|
||||
|
||||
Gui::Selection().clearSelection();
|
||||
|
||||
@@ -105,6 +105,8 @@ protected:
|
||||
|
||||
private:
|
||||
Gui::WeakPtrT<ViewProviderDressUp> DressUpView;
|
||||
|
||||
Gui::ViewProvider* previouslyShownViewProvider { nullptr };
|
||||
};
|
||||
|
||||
/// simulation dialog for the TaskView
|
||||
|
||||
Reference in New Issue
Block a user