From 2851920fb4c9aaeab1d91819b9403c017b8d1e24 Mon Sep 17 00:00:00 2001 From: Vincent Texier <vit@free.fr> Date: Wed, 18 Feb 2015 20:22:38 +0100 Subject: [PATCH] Context menu on transactions table work again --- src/cutecoin/gui/currency_tab.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cutecoin/gui/currency_tab.py b/src/cutecoin/gui/currency_tab.py index 8b9ffc5f..623d8461 100644 --- a/src/cutecoin/gui/currency_tab.py +++ b/src/cutecoin/gui/currency_tab.py @@ -236,12 +236,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) -- GitLab