PD: fix crash in thickness dialog when clicking 'Add Face' button

This commit is contained in:
wmayer
2022-01-16 18:59:26 +01:00
parent 1f6daebdbf
commit be020c8d9d
2 changed files with 7 additions and 4 deletions

View File

@@ -181,15 +181,18 @@ void TaskDressUpParameters::onButtonRefAdd(bool checked)
clearButtons(refAdd);
hideObject();
selectionMode = refAdd;
addAllEdgesAction->setEnabled(true);
if (addAllEdgesAction)
addAllEdgesAction->setEnabled(true);
AllowSelectionFlags allow;
allow.setFlag(AllowSelection::EDGE, allowEdges);
allow.setFlag(AllowSelection::FACE, allowFaces);
Gui::Selection().clearSelection();
Gui::Selection().addSelectionGate(new ReferenceSelection(this->getBase(), allow));
DressUpView->highlightReferences(true);
} else {
addAllEdgesAction->setEnabled(false);
}
else {
if (addAllEdgesAction)
addAllEdgesAction->setEnabled(false);
exitSelectionMode();
DressUpView->highlightReferences(false);
}

View File

@@ -95,7 +95,7 @@ protected:
QAction* addAllEdgesAction;
bool allowFaces, allowEdges;
selectionModes selectionMode;
selectionModes selectionMode;
int transactionID;
};