From e9c937f90915393714b95d2915adc7a98e98ddd1 Mon Sep 17 00:00:00 2001 From: Tannin Date: Wed, 25 Feb 2015 18:03:26 +0100 Subject: bugfix: plugin list wasn't user-sortable --- src/pluginlistsortproxy.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/pluginlistsortproxy.cpp') diff --git a/src/pluginlistsortproxy.cpp b/src/pluginlistsortproxy.cpp index 8d63e2e2..b8ac220a 100644 --- a/src/pluginlistsortproxy.cpp +++ b/src/pluginlistsortproxy.cpp @@ -52,11 +52,14 @@ void PluginListSortProxy::setEnabledColumns(unsigned int columns) Qt::ItemFlags PluginListSortProxy::flags(const QModelIndex &modelIndex) const { - Qt::ItemFlags flags = sourceModel()->flags(mapToSource(modelIndex)); -/* if (sortColumn() == PluginList::COL_NAME) { - flags &= ~Qt::ItemIsDragEnabled; - }*/ - return flags; +/* Qt::ItemFlags flags; + QModelIndex index = mapToSource(modelIndex); + if (index.isValid()) { + flags = sourceModel()->flags(index); + } + return flags;*/ + + return sourceModel()->flags(mapToSource(modelIndex)); } -- cgit v1.3.1