Some code unification for sketchbased features
This commit is contained in:
committed by
Stefan Tröger
parent
c382fb3afb
commit
dfd27740a9
@@ -225,8 +225,7 @@ void TaskPocketParameters::onLengthChanged(double len)
|
||||
{
|
||||
PartDesign::Pocket* pcPocket = static_cast<PartDesign::Pocket*>(vp->getObject());
|
||||
pcPocket->Length.setValue(len);
|
||||
if (updateView())
|
||||
pcPocket->getDocument()->recomputeFeature(pcPocket);
|
||||
recomputeFeature();
|
||||
}
|
||||
|
||||
void TaskPocketParameters::onMidplaneChanged(bool on)
|
||||
@@ -234,16 +233,14 @@ void TaskPocketParameters::onMidplaneChanged(bool on)
|
||||
PartDesign::Pocket* pcPocket = static_cast<PartDesign::Pocket*>(vp->getObject());
|
||||
pcPocket->Midplane.setValue(on);
|
||||
ui->checkBoxReversed->setEnabled(!on);
|
||||
if (updateView())
|
||||
pcPocket->getDocument()->recomputeFeature(pcPocket);
|
||||
recomputeFeature();
|
||||
}
|
||||
|
||||
void TaskPocketParameters::onReversedChanged(bool on)
|
||||
{
|
||||
PartDesign::Pocket* pcPocket = static_cast<PartDesign::Pocket*>(vp->getObject());
|
||||
pcPocket->Reversed.setValue(on);
|
||||
if (updateView())
|
||||
pcPocket->getDocument()->recomputeFeature(pcPocket);
|
||||
recomputeFeature();
|
||||
}
|
||||
|
||||
void TaskPocketParameters::onModeChanged(int index)
|
||||
@@ -280,13 +277,11 @@ void TaskPocketParameters::onModeChanged(int index)
|
||||
}
|
||||
|
||||
updateUI(index);
|
||||
|
||||
if (updateView())
|
||||
pcPocket->getDocument()->recomputeFeature(pcPocket);
|
||||
recomputeFeature();
|
||||
}
|
||||
|
||||
void TaskPocketParameters::onButtonFace(const bool pressed) {
|
||||
TaskSketchBasedParameters::onButtonFace(pressed);
|
||||
TaskSketchBasedParameters::onSelectReference(pressed, false, true, false);
|
||||
|
||||
// Update button if onButtonFace() is called explicitly
|
||||
ui->buttonFace->setChecked(pressed);
|
||||
@@ -320,11 +315,6 @@ QByteArray TaskPocketParameters::getFaceName(void) const
|
||||
return "";
|
||||
}
|
||||
|
||||
const bool TaskPocketParameters::updateView() const
|
||||
{
|
||||
return ui->checkBoxUpdateView->isChecked();
|
||||
}
|
||||
|
||||
TaskPocketParameters::~TaskPocketParameters()
|
||||
{
|
||||
delete ui;
|
||||
|
||||
Reference in New Issue
Block a user