From acca8d502b7c1f599eccac7c15934c6ea1563538 Mon Sep 17 00:00:00 2001 From: Michael Wozniak Date: Fri, 15 Nov 2013 23:22:47 -0500 Subject: [PATCH] do not show used addresses if there are not any --- gui/qt/main_window.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py index 71a0b3d5..82bbacba 100644 --- a/gui/qt/main_window.py +++ b/gui/qt/main_window.py @@ -1232,7 +1232,7 @@ class ElectrumWindow(QMainWindow): seq_item = QTreeWidgetItem( [ name, '', '', '', ''] ) account_item.addChild(seq_item) used_item = QTreeWidgetItem( [ _("Used"), '', '', '', ''] ) - seq_item.addChild(used_item) + used_flag = False if not is_change: seq_item.setExpanded(True) is_red = False @@ -1255,6 +1255,9 @@ class ElectrumWindow(QMainWindow): if is_red: item.setBackgroundColor(1, QColor('red')) if len(h) > 0 and c == -u: + if not used_flag: + seq_item.addChild(used_item) + used_flag = True used_item.addChild(item) else: seq_item.addChild(item)