[PartDesign Fillet/Chamfer] add UseAllEdges boolean property (#5340)

- [PartDesign Fillet/Chamfer] add UseAllEdges boolean property
- add UseAllEdges checkbox to fillet and chamfer dialogs
- put UseAllEdges property into Chamfer and Fillet groups, create Fillet group for fillets and put Radius into it, too.
This commit is contained in:
Mark Ganson TheMarkster
2022-02-04 18:50:51 -06:00
committed by GitHub
parent 9c9ed2847b
commit aa76cbc875
13 changed files with 108 additions and 15 deletions

View File

@@ -63,6 +63,11 @@ TaskFilletParameters::TaskFilletParameters(ViewProviderDressUp *DressUpView, QWi
this->groupLayout()->addWidget(proxy);
PartDesign::Fillet* pcFillet = static_cast<PartDesign::Fillet*>(DressUpView->getObject());
bool useAllEdges = pcFillet->UseAllEdges.getValue();
ui->checkBoxUseAllEdges->setChecked(useAllEdges);
ui->buttonRefAdd->setEnabled(!useAllEdges);
ui->buttonRefRemove->setEnabled(!useAllEdges);
ui->listWidgetReferences->setEnabled(!useAllEdges);
double r = pcFillet->Radius.getValue();
ui->filletRadius->setUnit(Base::Unit::Length);
@@ -85,6 +90,8 @@ TaskFilletParameters::TaskFilletParameters(ViewProviderDressUp *DressUpView, QWi
this, SLOT(onButtonRefAdd(bool)));
connect(ui->buttonRefRemove, SIGNAL(toggled(bool)),
this, SLOT(onButtonRefRemove(bool)));
connect(ui->checkBoxUseAllEdges, SIGNAL(toggled(bool)),
this, SLOT(onCheckBoxUseAllEdgesToggled(bool)));
// Create context menu
createDeleteAction(ui->listWidgetReferences, ui->buttonRefRemove);
@@ -145,6 +152,16 @@ void TaskFilletParameters::onSelectionChanged(const Gui::SelectionChanges& msg)
}
}
void TaskFilletParameters::onCheckBoxUseAllEdgesToggled(bool checked)
{
PartDesign::Fillet* pcFillet = static_cast<PartDesign::Fillet*>(DressUpView->getObject());
ui->buttonRefRemove->setEnabled(!checked);
ui->buttonRefAdd->setEnabled(!checked);
ui->listWidgetReferences->setEnabled(!checked);
pcFillet->UseAllEdges.setValue(checked);
pcFillet->getDocument()->recomputeFeature(pcFillet);
}
void TaskFilletParameters::clearButtons(const selectionModes notThis)
{
if (notThis != refAdd) ui->buttonRefAdd->setChecked(false);