summaryrefslogtreecommitdiff
path: root/gui/digitlabeldelegate.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gui/digitlabeldelegate.cc')
-rw-r--r--gui/digitlabeldelegate.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/gui/digitlabeldelegate.cc b/gui/digitlabeldelegate.cc
index 430946c..7a6a1d5 100644
--- a/gui/digitlabeldelegate.cc
+++ b/gui/digitlabeldelegate.cc
@@ -37,9 +37,13 @@ void DigitLabelDelegate::paint(
QString t;
QStyleOptionViewItem o;
QStyle *s;
+ QVariant a;
+ bool e;
- v = index.data(Qt::DisplayRole).toInt();
- t = format_toggled_value(v, this->is_hex);
+ a = index.data(Qt::DisplayRole);
+ v = a.toInt();
+ e = a.isNull();
+ t = format_toggled_value(v, this->is_hex, e);
o = option;
initStyleOption(&o, index);