Skip to content

Commit

Permalink
fix disconnectButton not visible sometimes
Browse files Browse the repository at this point in the history
  • Loading branch information
gretzke committed Dec 9, 2019
1 parent 90f5270 commit b67c8fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plug_py/plug.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,8 @@ async def initialized_S(self):
self.paymentState = State.active_P

async def active_P(self):
window.ui.acceptPriceButton.setVisible(False)
window.ui.disconnectButton.setVisible(True)
# send first transaction regardless whether current is flowing or not
if self.transactionCounter != 0:
# after first transaction was sent wait until current flows, start timer
Expand All @@ -575,7 +577,6 @@ async def active_P(self):
window.cm_thread = measureCurrent()
window.cm_thread.start()
self.startTimestamp = time()
window.ui.disconnectButton.setVisible(True)
return
else:
# if current measurement thread not running, set up
Expand Down

0 comments on commit b67c8fb

Please sign in to comment.