1
0

do not block GUI with open_channel

This commit is contained in:
ThomasV
2018-06-08 12:53:35 +02:00
parent 40fcf58fec
commit 6e71340e52
5 changed files with 8 additions and 9 deletions

View File

@@ -26,10 +26,10 @@ class ChannelsList(MyTreeWidget):
def create_menu(self, position):
menu = QtWidgets.QMenu()
cur = self.currentItem()
print('ID', bh2u(cur.data(0, QtCore.Qt.UserRole)))
channel_id = self.currentItem().data(0, QtCore.Qt.UserRole)
print('ID', bh2u(channel_id))
def close():
print("closechannel result", self.parent.wallet.lnworker.close_channel_from_other_thread(cur.di))
self.parent.wallet.lnworker.close_channel(channel_id)
menu.addAction(_("Close channel"), close)
menu.exec_(self.viewport().mapToGlobal(position))