diff options
author | Andrew Chow <achow101@gmail.com> | 2016-10-03 19:40:40 -0400 |
---|---|---|
committer | Andrew Chow <achow101@gmail.com> | 2016-11-08 08:50:04 -0500 |
commit | addfdebe1a2ec45f718638f39a9ae3afb531805f (patch) | |
tree | 1c8567526b0eac7767dd40f0c115c38bc1ebd995 /src/qt/guiutil.cpp | |
parent | 4e5782438c3d117be7e52ddd0d35ae0475a30759 (diff) |
Multiple Selection for peer and ban tables
Allows multiple selection and action for the nodes in the peer and ban tables in the Debug Window.
Diffstat (limited to 'src/qt/guiutil.cpp')
-rw-r--r-- | src/qt/guiutil.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index 42dafa1175..9dc75c2e1a 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -291,17 +291,11 @@ void copyEntryData(QAbstractItemView *view, int column, int role) } } -QVariant getEntryData(QAbstractItemView *view, int column, int role) +QList<QModelIndex> getEntryData(QAbstractItemView *view, int column) { if(!view || !view->selectionModel()) - return QVariant(); - QModelIndexList selection = view->selectionModel()->selectedRows(column); - - if(!selection.isEmpty()) { - // Return first item - return (selection.at(0).data(role)); - } - return QVariant(); + return QList<QModelIndex>(); + return view->selectionModel()->selectedRows(column); } QString getSaveFileName(QWidget *parent, const QString &caption, const QString &dir, |