electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 27f4a0c28e9b07f59342fdb790243ebb4f25b008
parent ada24d24632ac49b431e1e02d0ca8ee14e161fdf
Author: ThomasV <thomasv@gitorious>
Date:   Wed, 17 Oct 2012 07:18:48 +0200

fix: update history when label changed

Diffstat:
Mlib/gui_qt.py | 18++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/lib/gui_qt.py b/lib/gui_qt.py @@ -408,19 +408,29 @@ class ElectrumWindow(QMainWindow): def address_label_changed(self, item, column, l, column_addr, column_label): addr = unicode( item.text(column_addr) ) text = unicode( item.text(column_label) ) + changed = False + if text: if text not in self.wallet.aliases.keys(): - self.wallet.labels[addr] = text + old_addr = self.wallet.labels.get(text) + if old_addr != addr: + self.wallet.labels[addr] = text + changed = True else: print_error("Error: This is one of your aliases") label = self.wallet.labels.get(addr,'') item.setText(column_label, QString(label)) else: s = self.wallet.labels.get(addr) - if s: self.wallet.labels.pop(addr) + if s: + self.wallet.labels.pop(addr) + changed = True + + if changed: + self.wallet.update_tx_labels() + self.update_history_tab() + self.update_completions() - self.update_history_tab() - self.update_completions() def update_history_tab(self): self.history_list.clear()