summaryrefslogtreecommitdiffstats
path: root/qt-ui/models.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-01 14:30:34 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-01 14:43:07 -0700
commit04e59a0e1cdb32c5091fc4bc0d692f00821ab849 (patch)
treeed0c673ab4b680d236d67e961a28390fe31f0a5c /qt-ui/models.cpp
parent5c2ce0ac200cbf4b37a9765148b78d3091b5cd9f (diff)
downloadsubsurface-04e59a0e1cdb32c5091fc4bc0d692f00821ab849.tar.gz
Hook up adding a weightsystem
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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;
}