diff options
| author | Tannin <devnull@localhost> | 2015-02-25 18:03:26 +0100 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2015-02-25 18:03:26 +0100 |
| commit | e9c937f90915393714b95d2915adc7a98e98ddd1 (patch) | |
| tree | 7811b540756ab7a004ecbf0f50eb3863b09730f0 /src/pluginlistsortproxy.cpp | |
| parent | d87661a66fe76d8b268cbfe81f3eb6292a55d66b (diff) | |
bugfix: plugin list wasn't user-sortable
Diffstat (limited to 'src/pluginlistsortproxy.cpp')
| -rw-r--r-- | src/pluginlistsortproxy.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
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));
}
|
