Slider: add label substitution for certain values
Allows "Threads" option in advanced export setting to show "Auto" when set to 0
This commit is contained in:
@@ -104,7 +104,17 @@ void SliderBase::changeEvent(QEvent *e)
|
||||
|
||||
void SliderBase::UpdateLabel()
|
||||
{
|
||||
label_->setText(tristate_ ? tr("---") : GetFormattedValueToString());
|
||||
QString s;
|
||||
|
||||
if (tristate_) {
|
||||
s = tr("---");
|
||||
} else if (label_substitutions_.contains(GetValueInternal())) {
|
||||
s = label_substitutions_.value(GetValueInternal());
|
||||
} else {
|
||||
s = GetFormattedValueToString();
|
||||
}
|
||||
|
||||
label_->setText(s);
|
||||
}
|
||||
|
||||
QVariant SliderBase::AdjustValue(const QVariant &value) const
|
||||
|
||||
Reference in New Issue
Block a user