diff --git a/src/cutecoin/gui/identities_tab.py b/src/cutecoin/gui/identities_tab.py index f951ae5fec0065f9cc666f2e1eff1428c1cf6775..9ae72577eb5e44b3d3ab992b09caa2eeba2015c4 100644 --- a/src/cutecoin/gui/identities_tab.py +++ b/src/cutecoin/gui/identities_tab.py @@ -65,9 +65,13 @@ class IdentitiesTabWidget(QWidget, Ui_IdentitiesTab): self.community = None def change_community(self, community): + if self.community: + self.account.identity(self.community).inner_data_changed.disconnect(self.handle_account_identity_change) + if community: + self.account.identity(self.community).inner_data_changed.connect(self.handle_account_identity_change) + self.community = community self.table_identities.model().change_community(community) - self.account.identity(self.community).inner_data_changed.connect(self.handle_account_identity_change) def identity_context_menu(self, point): index = self.table_identities.indexAt(point) diff --git a/src/cutecoin/gui/mainwindow.py b/src/cutecoin/gui/mainwindow.py index a978deae290c9d0d3853b3b37cd6a6373b28c10a..6a15ad977636b56ecf71bb375cdf1939d8a1df48 100644 --- a/src/cutecoin/gui/mainwindow.py +++ b/src/cutecoin/gui/mainwindow.py @@ -148,6 +148,8 @@ class MainWindow(QMainWindow, Ui_MainWindow): self.app.current_account, None, self.password_asker) if dialog.exec_() == QDialog.Accepted: + self.app.save(self.app.current_account) + dialog.community.start_coroutines() self.homescreen.refresh() def open_transfer_money_dialog(self): diff --git a/src/cutecoin/gui/network_tab.py b/src/cutecoin/gui/network_tab.py index 0c0e73c657765c123246e13c95263231d0cab2f9..0ff9795bd6fb78fc681653190aafe85bbab04041 100644 --- a/src/cutecoin/gui/network_tab.py +++ b/src/cutecoin/gui/network_tab.py @@ -41,10 +41,10 @@ class NetworkTabWidget(QWidget, Ui_NetworkTabWidget): self.table_network.resizeColumnsToContents() def change_community(self, community): - if community: - community.network.nodes_changed.connect(self.refresh_nodes) if self.community: self.community.network.nodes_changed.disconnect(self.refresh_nodes) + if community: + community.network.nodes_changed.connect(self.refresh_nodes) self.community = community self.table_network.model().change_community(community) diff --git a/src/cutecoin/gui/transactions_tab.py b/src/cutecoin/gui/transactions_tab.py index 0009941d9ad4306abce52982021c33cc893c053d..7517231122e3e2da0e4693e59f5616edeae45333 100644 --- a/src/cutecoin/gui/transactions_tab.py +++ b/src/cutecoin/gui/transactions_tab.py @@ -41,6 +41,7 @@ class TransactionsTabWidget(QWidget, Ui_transactionsTabWidget): community.inner_data_changed.connect(self.refresh_minimum_maximum) self.community = community self.refresh() + self.stop_progress([]) def refresh_minimum_maximum(self): block = self.community.get_block(1) diff --git a/src/cutecoin/models/network.py b/src/cutecoin/models/network.py index 6ba11e5703f79bc91cc8fac8e02468b04ac085eb..6282af4647fa54a265887a44730b5616c35fad6d 100644 --- a/src/cutecoin/models/network.py +++ b/src/cutecoin/models/network.py @@ -128,7 +128,9 @@ class NetworkTableModel(QAbstractTableModel): } def change_community(self, community): + self.beginResetModel() self.community = community + self.endResetModel() @property def nodes(self):