mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
LP-245 config: display hex zero as an empty string
this is needed to see placeholder text
This commit is contained in:
parent
7eeb381fd3
commit
7fd393bb79
@ -986,7 +986,12 @@ bool ConfigTaskWidget::setWidgetFromVariant(QWidget *widget, QVariant value, Wid
|
||||
} else if (QLineEdit * cb = qobject_cast<QLineEdit *>(widget)) {
|
||||
if ((scale == 0) || (scale == 1)) {
|
||||
if (binding->units() == "hex") {
|
||||
cb->setText(QString::number(value.toUInt(), 16).toUpper());
|
||||
if (value.toUInt()) {
|
||||
cb->setText(QString::number(value.toUInt(), 16).toUpper());
|
||||
} else {
|
||||
// display 0 as an empty string
|
||||
cb->setText("");
|
||||
}
|
||||
} else {
|
||||
cb->setText(value.toString());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user