electrum

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

commit ccec45a5640bdc8161229753524fd468fd98f1a5
parent 0bce96d2dec6b7a6b244f08f2619b90a3e30ca54
Author: SomberNight <somber.night@protonmail.com>
Date:   Mon, 24 Dec 2018 19:03:10 +0100

qt: fix address list context menu race

closes #4961

Diffstat:
Melectrum/gui/qt/address_list.py | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/electrum/gui/qt/address_list.py b/electrum/gui/qt/address_list.py @@ -152,8 +152,11 @@ class AddressList(MyTreeView): is_multisig = isinstance(self.wallet, Multisig_Wallet) can_delete = self.wallet.can_delete_address() selected = self.selected_in_column(1) + if not selected: + return multi_select = len(selected) > 1 addrs = [self.model().itemFromIndex(item).text() for item in selected] + menu = QMenu() if not multi_select: idx = self.indexAt(position) col = idx.column() @@ -162,8 +165,6 @@ class AddressList(MyTreeView): return addr = addrs[0] - menu = QMenu() - if not multi_select: addr_column_title = self.model().horizontalHeaderItem(2).text() addr_idx = idx.sibling(idx.row(), 2)