summaryrefslogtreecommitdiffstats
path: root/qt-ui/models.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/models.cpp')
-rw-r--r--qt-ui/models.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index 4583c36cd..6756002e2 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -186,13 +186,15 @@ QVariant WeightModel::headerData(int section, Qt::Orientation orientation, int r
return ret;
}
- switch(section) {
- case TYPE:
- ret = tr("Type");
- break;
- case WEIGHT:
- ret = tr("Weight");
- break;
+ if (role == Qt::DisplayRole) {
+ switch(section) {
+ case TYPE:
+ ret = tr("Type");
+ break;
+ case WEIGHT:
+ ret = tr("Weight");
+ break;
+ }
}
return ret;
}