From 37b0737f6dbd29f822cf4ad11434d2bdfc5cc9f6 Mon Sep 17 00:00:00 2001 From: thomasv Date: Mon, 22 Oct 2012 17:31:37 +0200 Subject: [PATCH] wait until connected --- lib/gui_qt.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/gui_qt.py b/lib/gui_qt.py index 2dd6fff5a..b28679fb3 100644 --- a/lib/gui_qt.py +++ b/lib/gui_qt.py @@ -1572,6 +1572,11 @@ class ElectrumGui: # ask for the server. if not ElectrumWindow.network_dialog( wallet, parent=None ): return False + # wait until we are connected, because the user might have selected another server + if not wallet.interface.is_connected: + waiting = lambda: False if wallet.interface.is_connected else "connecting...\n" + waiting_dialog(waiting) + waiting = lambda: False if wallet.up_to_date else "Please wait...\nAddresses generated: %d\nKilobytes received: %.1f"\ %(len(wallet.all_addresses()), wallet.interface.bytes_received/1024.)