PartDesign: Replaced QuantitySpinBox by SpinBox for "occurrences" input field.
This commit is contained in:
@@ -27,8 +27,6 @@
|
||||
# include <QMessageBox>
|
||||
#endif
|
||||
|
||||
#include <boost/math/special_functions/round.hpp>
|
||||
|
||||
#include "ui_TaskScaledParameters.h"
|
||||
#include "TaskScaledParameters.h"
|
||||
#include "TaskMultiTransformParameters.h"
|
||||
@@ -94,8 +92,8 @@ void TaskScaledParameters::setupUI()
|
||||
{
|
||||
connect(ui->spinFactor, SIGNAL(valueChanged(double)),
|
||||
this, SLOT(onFactor(double)));
|
||||
connect(ui->spinOccurrences, SIGNAL(valueChanged(double)),
|
||||
this, SLOT(onOccurrences(double)));
|
||||
connect(ui->spinOccurrences, SIGNAL(valueChanged(uint)),
|
||||
this, SLOT(onOccurrences(uint)));
|
||||
connect(ui->checkBoxUpdateView, SIGNAL(toggled(bool)),
|
||||
this, SLOT(onUpdateView(bool)));
|
||||
|
||||
@@ -157,12 +155,12 @@ void TaskScaledParameters::onFactor(const double f)
|
||||
recomputeFeature();
|
||||
}
|
||||
|
||||
void TaskScaledParameters::onOccurrences(const double n)
|
||||
void TaskScaledParameters::onOccurrences(const uint n)
|
||||
{
|
||||
if (blockUpdate)
|
||||
return;
|
||||
PartDesign::Scaled* pcScaled = static_cast<PartDesign::Scaled*>(getObject());
|
||||
pcScaled->Occurrences.setValue(boost::math::round(n));
|
||||
pcScaled->Occurrences.setValue(n);
|
||||
recomputeFeature();
|
||||
}
|
||||
|
||||
@@ -185,7 +183,7 @@ const double TaskScaledParameters::getFactor(void) const
|
||||
|
||||
const unsigned TaskScaledParameters::getOccurrences(void) const
|
||||
{
|
||||
return boost::math::round(ui->spinOccurrences->value().getValue());
|
||||
return ui->spinOccurrences->value();
|
||||
}
|
||||
|
||||
TaskScaledParameters::~TaskScaledParameters()
|
||||
|
||||
Reference in New Issue
Block a user