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

Merge branch 'dev081' into dev

parents 3f577c17 2851920f
No related branches found
No related tags found
No related merge requests found
......@@ -55,14 +55,14 @@ class CommunityTabWidget(QWidget, Ui_CommunityTabWidget):
def member_context_menu(self, point):
index = self.table_community_members.indexAt(point)
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)
pubkey_col = model.sourceModel().columns.index('Pubkey')
pubkey_index = model.sourceModel().index(source_index.row(),
pubkey_col)
pubkey = model.sourceModel().data(pubkey_index, Qt.DisplayRole)
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.triggered.connect(self.add_member_as_contact)
......
......@@ -239,12 +239,12 @@ class CurrencyTabWidget(QWidget, Ui_CurrencyTabWidget):
if index.row() < model.rowCount(QModelIndex()):
menu = QMenu("Actions", self)
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_col)
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(),
pubkey_col)
person = model.sourceModel().data(person_index, Qt.DisplayRole)
......
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