Skip to content
Snippets Groups Projects
Commit cd39e37f authored by inso's avatar inso
Browse files

Fix bugs with multiple tiles

parent 8bd095c5
No related branches found
No related tags found
No related merge requests found
...@@ -65,9 +65,13 @@ class IdentitiesTabWidget(QWidget, Ui_IdentitiesTab): ...@@ -65,9 +65,13 @@ class IdentitiesTabWidget(QWidget, Ui_IdentitiesTab):
self.community = None self.community = None
def change_community(self, community): 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.community = community
self.table_identities.model().change_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): def identity_context_menu(self, point):
index = self.table_identities.indexAt(point) index = self.table_identities.indexAt(point)
......
...@@ -148,6 +148,8 @@ class MainWindow(QMainWindow, Ui_MainWindow): ...@@ -148,6 +148,8 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.app.current_account, None, self.app.current_account, None,
self.password_asker) self.password_asker)
if dialog.exec_() == QDialog.Accepted: if dialog.exec_() == QDialog.Accepted:
self.app.save(self.app.current_account)
dialog.community.start_coroutines()
self.homescreen.refresh() self.homescreen.refresh()
def open_transfer_money_dialog(self): def open_transfer_money_dialog(self):
......
...@@ -41,10 +41,10 @@ class NetworkTabWidget(QWidget, Ui_NetworkTabWidget): ...@@ -41,10 +41,10 @@ class NetworkTabWidget(QWidget, Ui_NetworkTabWidget):
self.table_network.resizeColumnsToContents() self.table_network.resizeColumnsToContents()
def change_community(self, community): def change_community(self, community):
if community:
community.network.nodes_changed.connect(self.refresh_nodes)
if self.community: if self.community:
self.community.network.nodes_changed.disconnect(self.refresh_nodes) self.community.network.nodes_changed.disconnect(self.refresh_nodes)
if community:
community.network.nodes_changed.connect(self.refresh_nodes)
self.community = community self.community = community
self.table_network.model().change_community(community) self.table_network.model().change_community(community)
......
...@@ -41,6 +41,7 @@ class TransactionsTabWidget(QWidget, Ui_transactionsTabWidget): ...@@ -41,6 +41,7 @@ class TransactionsTabWidget(QWidget, Ui_transactionsTabWidget):
community.inner_data_changed.connect(self.refresh_minimum_maximum) community.inner_data_changed.connect(self.refresh_minimum_maximum)
self.community = community self.community = community
self.refresh() self.refresh()
self.stop_progress([])
def refresh_minimum_maximum(self): def refresh_minimum_maximum(self):
block = self.community.get_block(1) block = self.community.get_block(1)
......
...@@ -128,7 +128,9 @@ class NetworkTableModel(QAbstractTableModel): ...@@ -128,7 +128,9 @@ class NetworkTableModel(QAbstractTableModel):
} }
def change_community(self, community): def change_community(self, community):
self.beginResetModel()
self.community = community self.community = community
self.endResetModel()
@property @property
def nodes(self): def nodes(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment