summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-02-06 07:07:44 +0100
committerPetr Mrázek <peterix@gmail.com>2013-02-06 07:07:44 +0100
commit4e9006769e3554524096d45f8a1ce16ccfa78bfc (patch)
treef5f8fec5c3c1741594ed8d82c037697e7b61485a
parent00893b3cfc68f12c09e84643d255044a488b0eb6 (diff)
downloadMultiMC-4e9006769e3554524096d45f8a1ce16ccfa78bfc.tar
MultiMC-4e9006769e3554524096d45f8a1ce16ccfa78bfc.tar.gz
MultiMC-4e9006769e3554524096d45f8a1ce16ccfa78bfc.tar.lz
MultiMC-4e9006769e3554524096d45f8a1ce16ccfa78bfc.tar.xz
MultiMC-4e9006769e3554524096d45f8a1ce16ccfa78bfc.zip
Some minor changes in the instance model and control
-rw-r--r--data/instancemodel.cpp5
-rw-r--r--gui/mainwindow.ui12
2 files changed, 12 insertions, 5 deletions
diff --git a/data/instancemodel.cpp b/data/instancemodel.cpp
index 239be5c5..44d2844b 100644
--- a/data/instancemodel.cpp
+++ b/data/instancemodel.cpp
@@ -143,12 +143,9 @@ QVariant InstanceModel::data ( const QModelIndex& index, int role ) const
if (!index.isValid())
return QVariant();
- if (role != Qt::DisplayRole)
- return QVariant();
-
InstanceModelItem *item = static_cast<InstanceModelItem*>(index.internalPointer());
- return item->data(index.column());
+ return item->data(role);
}
QModelIndex InstanceModel::index ( int row, int column, const QModelIndex& parent ) const
diff --git a/gui/mainwindow.ui b/gui/mainwindow.ui
index ccc7e777..5abfb37d 100644
--- a/gui/mainwindow.ui
+++ b/gui/mainwindow.ui
@@ -34,7 +34,17 @@
<number>0</number>
</property>
<item>
- <widget class="QTreeView" name="instanceView"/>
+ <widget class="QTreeView" name="instanceView">
+ <property name="animated">
+ <bool>true</bool>
+ </property>
+ <property name="allColumnsShowFocus">
+ <bool>true</bool>
+ </property>
+ <attribute name="headerVisible">
+ <bool>false</bool>
+ </attribute>
+ </widget>
</item>
</layout>
</widget>