From ef16856830dfc9660542f3c0ceed9e57ec58a0b6 Mon Sep 17 00:00:00 2001 From: Vincent Texier <vit@free.fr> Date: Wed, 18 Feb 2015 20:13:15 +0100 Subject: [PATCH] Context menu on members date columns work again --- src/cutecoin/gui/community_tab.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cutecoin/gui/community_tab.py b/src/cutecoin/gui/community_tab.py index f723bdda..61fd2b56 100644 --- a/src/cutecoin/gui/community_tab.py +++ b/src/cutecoin/gui/community_tab.py @@ -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) -- GitLab