PartDesign: [skip ci] fix possible segmentation fault in destructors of dressup task panels

This commit is contained in:
wmayer
2020-02-16 20:58:44 +01:00
parent bd36e59866
commit b06251e853
5 changed files with 3 additions and 18 deletions

View File

@@ -196,10 +196,6 @@ double TaskChamferParameters::getLength(void) const
TaskChamferParameters::~TaskChamferParameters()
{
// assure the fillets are shown
showObject();
// remove any highlights and selections
DressUpView->highlightReferences(false);
Gui::Selection().clearSelection();
Gui::Selection().rmvSelectionGate();

View File

@@ -302,10 +302,6 @@ bool TaskDraftParameters::getReversed(void) const
TaskDraftParameters::~TaskDraftParameters()
{
// assure the fillets are shown
showObject();
// remove any highlights and selections
DressUpView->highlightReferences(false);
Gui::Selection().clearSelection();
Gui::Selection().rmvSelectionGate();

View File

@@ -225,10 +225,11 @@ void TaskDressUpParameters::hideObject()
void TaskDressUpParameters::showObject()
{
DressUpView->getObject()->Visibility.setValue(true);
App::DocumentObject* base = getBase();
if (base)
if (base) {
DressUpView->getObject()->Visibility.setValue(true);
base->Visibility.setValue(false);
}
}
Part::Feature* TaskDressUpParameters::getBase(void) const

View File

@@ -197,10 +197,6 @@ double TaskFilletParameters::getLength(void) const
TaskFilletParameters::~TaskFilletParameters()
{
// assure the fillets are shown
showObject();
// remove any highlights and selections
DressUpView->highlightReferences(false);
Gui::Selection().clearSelection();
Gui::Selection().rmvSelectionGate();

View File

@@ -276,10 +276,6 @@ int TaskThicknessParameters::getMode(void) const {
TaskThicknessParameters::~TaskThicknessParameters()
{
// assure the fillets are shown
showObject();
// remove any highlights and selections
DressUpView->highlightReferences(false);
Gui::Selection().clearSelection();
Gui::Selection().rmvSelectionGate();