PD: Fix possible crashes in dress-up task panels
This commit is contained in:
@@ -115,13 +115,16 @@ void TaskFilletParameters::onSelectionChanged(const Gui::SelectionChanges& msg)
|
||||
|
||||
void TaskFilletParameters::onCheckBoxUseAllEdgesToggled(bool checked)
|
||||
{
|
||||
if (checked)
|
||||
setSelectionMode(none);
|
||||
PartDesign::Fillet* pcFillet = static_cast<PartDesign::Fillet*>(DressUpView->getObject());
|
||||
ui->buttonRefSel->setEnabled(!checked);
|
||||
ui->listWidgetReferences->setEnabled(!checked);
|
||||
pcFillet->UseAllEdges.setValue(checked);
|
||||
pcFillet->getDocument()->recomputeFeature(pcFillet);
|
||||
if (auto fillet = getObject<PartDesign::Fillet>()) {
|
||||
if (checked) {
|
||||
setSelectionMode(none);
|
||||
}
|
||||
|
||||
ui->buttonRefSel->setEnabled(!checked);
|
||||
ui->listWidgetReferences->setEnabled(!checked);
|
||||
fillet->UseAllEdges.setValue(checked);
|
||||
fillet->recomputeFeature();
|
||||
}
|
||||
}
|
||||
|
||||
void TaskFilletParameters::setButtons(const selectionModes mode)
|
||||
@@ -142,13 +145,14 @@ void TaskFilletParameters::onAddAllEdges()
|
||||
|
||||
void TaskFilletParameters::onLengthChanged(double len)
|
||||
{
|
||||
setSelectionMode(none);
|
||||
PartDesign::Fillet* pcFillet = static_cast<PartDesign::Fillet*>(DressUpView->getObject());
|
||||
setupTransaction();
|
||||
pcFillet->Radius.setValue(len);
|
||||
pcFillet->getDocument()->recomputeFeature(pcFillet);
|
||||
// hide the fillet if there was a computation error
|
||||
hideOnError();
|
||||
if (auto fillet = getObject<PartDesign::Fillet>()) {
|
||||
setSelectionMode(none);
|
||||
setupTransaction();
|
||||
fillet->Radius.setValue(len);
|
||||
fillet->recomputeFeature();
|
||||
// hide the fillet if there was a computation error
|
||||
hideOnError();
|
||||
}
|
||||
}
|
||||
|
||||
double TaskFilletParameters::getLength() const
|
||||
|
||||
Reference in New Issue
Block a user