Some code unification for sketchbased features
This commit is contained in:
committed by
Stefan Tröger
parent
c382fb3afb
commit
dfd27740a9
@@ -128,8 +128,7 @@ void TaskGrooveParameters::onAngleChanged(double len)
|
||||
{
|
||||
PartDesign::Groove* pcGroove = static_cast<PartDesign::Groove*>(vp->getObject());
|
||||
pcGroove->Angle.setValue(len);
|
||||
if (updateView())
|
||||
pcGroove->getDocument()->recomputeFeature(pcGroove);
|
||||
recomputeFeature();
|
||||
}
|
||||
|
||||
void TaskGrooveParameters::onAxisChanged(int num)
|
||||
@@ -166,24 +165,21 @@ void TaskGrooveParameters::onAxisChanged(int num)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (updateView())
|
||||
pcGroove->getDocument()->recomputeFeature(pcGroove);
|
||||
recomputeFeature();
|
||||
}
|
||||
|
||||
void TaskGrooveParameters::onMidplane(bool on)
|
||||
{
|
||||
PartDesign::Groove* pcGroove = static_cast<PartDesign::Groove*>(vp->getObject());
|
||||
pcGroove->Midplane.setValue(on);
|
||||
if (updateView())
|
||||
pcGroove->getDocument()->recomputeFeature(pcGroove);
|
||||
recomputeFeature();
|
||||
}
|
||||
|
||||
void TaskGrooveParameters::onReversed(bool on)
|
||||
{
|
||||
PartDesign::Groove* pcGroove = static_cast<PartDesign::Groove*>(vp->getObject());
|
||||
pcGroove->Reversed.setValue(on);
|
||||
if (updateView())
|
||||
pcGroove->getDocument()->recomputeFeature(pcGroove);
|
||||
recomputeFeature();
|
||||
}
|
||||
|
||||
double TaskGrooveParameters::getAngle(void) const
|
||||
@@ -226,11 +222,6 @@ bool TaskGrooveParameters::getReversed(void) const
|
||||
return ui->checkBoxReversed->isChecked();
|
||||
}
|
||||
|
||||
const bool TaskGrooveParameters::updateView() const
|
||||
{
|
||||
return ui->checkBoxUpdateView->isChecked();
|
||||
}
|
||||
|
||||
TaskGrooveParameters::~TaskGrooveParameters()
|
||||
{
|
||||
delete ui;
|
||||
|
||||
Reference in New Issue
Block a user