diff --git a/src/cutecoin/core/app.py b/src/cutecoin/core/app.py index f5e76c5d63a9e4f2d2d33e287c295b22bfb9d684..3268a00786ace5da22bc1b5911ab80bcdbe683bb 100644 --- a/src/cutecoin/core/app.py +++ b/src/cutecoin/core/app.py @@ -251,7 +251,7 @@ class Application(QObject): community.currency + '_network') with open(network_path, 'w') as outfile: - data = community.jsonify_network() + data['network'] = community.jsonify_network() data['version'] = __version__ json.dump(data, outfile, indent=4, sort_keys=True) diff --git a/src/cutecoin/gui/network_tab.py b/src/cutecoin/gui/network_tab.py index 0fc50f1397e1bf6038d87521a8aacfdd33a77d4d..aad3e04a0059fe6121a93eda45f1d3512e8305f1 100644 --- a/src/cutecoin/gui/network_tab.py +++ b/src/cutecoin/gui/network_tab.py @@ -31,7 +31,6 @@ class NetworkTabWidget(QWidget, Ui_NetworkTabWidget): self.watcher_thread = QThread() self.network_watcher.moveToThread(self.watcher_thread) self.watcher_thread.started.connect(self.network_watcher.watch) - self.watcher_thread.start() community.network.nodes_changed.connect(self.refresh_nodes) @@ -43,3 +42,7 @@ class NetworkTabWidget(QWidget, Ui_NetworkTabWidget): self.network_watcher.deleteLater() self.watcher_thread.deleteLater() + def showEvent(self, event): + super().showEvent(event) + self.watcher_thread.start() +