mathnode: increased decimal places
Also includes general improvements to the slider widget such as an optional "autotrim" function to cut off trailing zeroes, a "format" string that's easier to internationalize, and general tidiness.
This commit is contained in:
@@ -662,6 +662,18 @@ void NodeParamViewWidgetBridge::PropertyChanged(const QString &key, const QVaria
|
||||
foreach (QWidget* w, widgets_) {
|
||||
static_cast<FloatSlider*>(w)->SetDisplayType(display_type);
|
||||
}
|
||||
} else if (key == QStringLiteral("decimalplaces")) {
|
||||
int dec_places = value.toInt();
|
||||
|
||||
foreach (QWidget* w, widgets_) {
|
||||
static_cast<FloatSlider*>(w)->SetDecimalPlaces(dec_places);
|
||||
}
|
||||
} else if (key == QStringLiteral("autotrim")) {
|
||||
bool autotrim = value.toBool();
|
||||
|
||||
foreach (QWidget* w, widgets_) {
|
||||
static_cast<FloatSlider*>(w)->SetAutoTrimDecimalPlaces(autotrim);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user