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

Merge branch 'dev081' into dev

parents 3f577c17 2851920f
Branches feature/agent_architecture
Tags
No related merge requests found
...@@ -55,14 +55,14 @@ class CommunityTabWidget(QWidget, Ui_CommunityTabWidget): ...@@ -55,14 +55,14 @@ class CommunityTabWidget(QWidget, Ui_CommunityTabWidget):
def member_context_menu(self, point): def member_context_menu(self, point):
index = self.table_community_members.indexAt(point) index = self.table_community_members.indexAt(point)
model = self.table_community_members.model() model = self.table_community_members.model()
if index.row() < model.rowCount() and index.column() < model.columnCount() - 2: if index.row() < model.rowCount():
source_index = model.mapToSource(index) source_index = model.mapToSource(index)
pubkey_col = model.sourceModel().columns.index('Pubkey') pubkey_col = model.sourceModel().columns.index('Pubkey')
pubkey_index = model.sourceModel().index(source_index.row(), pubkey_index = model.sourceModel().index(source_index.row(),
pubkey_col) pubkey_col)
pubkey = model.sourceModel().data(pubkey_index, Qt.DisplayRole) pubkey = model.sourceModel().data(pubkey_index, Qt.DisplayRole)
member = Person.lookup(pubkey, self.community) member = Person.lookup(pubkey, self.community)
menu = QMenu(model.data(index, Qt.DisplayRole), self) menu = QMenu(self)
add_contact = QAction("Add as contact", self) add_contact = QAction("Add as contact", self)
add_contact.triggered.connect(self.add_member_as_contact) add_contact.triggered.connect(self.add_member_as_contact)
......
...@@ -239,12 +239,12 @@ class CurrencyTabWidget(QWidget, Ui_CurrencyTabWidget): ...@@ -239,12 +239,12 @@ class CurrencyTabWidget(QWidget, Ui_CurrencyTabWidget):
if index.row() < model.rowCount(QModelIndex()): if index.row() < model.rowCount(QModelIndex()):
menu = QMenu("Actions", self) menu = QMenu("Actions", self)
source_index = model.mapToSource(index) source_index = model.mapToSource(index)
state_col = model.sourceModel().columns.index('State') state_col = model.sourceModel().column_types.index('state')
state_index = model.sourceModel().index(source_index.row(), state_index = model.sourceModel().index(source_index.row(),
state_col) state_col)
state_data = model.sourceModel().data(state_index, Qt.DisplayRole) state_data = model.sourceModel().data(state_index, Qt.DisplayRole)
pubkey_col = model.sourceModel().columns.index('UID/Public key') pubkey_col = model.sourceModel().column_types.index('uid')
person_index = model.sourceModel().index(source_index.row(), person_index = model.sourceModel().index(source_index.row(),
pubkey_col) pubkey_col)
person = model.sourceModel().data(person_index, Qt.DisplayRole) person = model.sourceModel().data(person_index, Qt.DisplayRole)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment