mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 09:21:39 +00:00
check item existence
This commit is contained in:
parent
477bd49577
commit
d2447ef309
1 changed files with 3 additions and 1 deletions
|
@ -259,6 +259,7 @@ class ElectrumWindow(QMainWindow):
|
|||
def create_history_menu(self, position):
|
||||
self.history_list.selectedIndexes()
|
||||
item = self.history_list.currentItem()
|
||||
if not item: return
|
||||
menu = QMenu()
|
||||
menu.addAction(_("Details"), lambda: self.tx_details(item,2))
|
||||
menu.addAction(_("Edit description"), lambda: self.tx_label_clicked(item,2))
|
||||
|
@ -690,12 +691,13 @@ class ElectrumWindow(QMainWindow):
|
|||
# fixme: this function apparently has a side effect.
|
||||
# if it is not called the menu pops up several times
|
||||
self.contacts_list.selectedIndexes()
|
||||
item = self.contacts_list.currentItem()
|
||||
if not item: return
|
||||
addr = self.get_current_addr(False)
|
||||
menu = QMenu()
|
||||
menu.addAction(_("Pay to"), lambda: self.payto(addr))
|
||||
menu.addAction(_("Copy to Clipboard"), lambda: self.app.clipboard().setText(addr))
|
||||
menu.addAction(_("View QR code"),lambda: self.show_address_qrcode(addr))
|
||||
item = self.contacts_list.currentItem()
|
||||
label = unicode( item.text(1) )
|
||||
if label not in self.wallet.aliases.keys():
|
||||
menu.addAction(_("Edit label"), lambda: self.edit_label(False))
|
||||
|
|
Loading…
Add table
Reference in a new issue