From 04e59a0e1cdb32c5091fc4bc0d692f00821ab849 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 1 May 2013 14:30:34 -0700 Subject: Hook up adding a weightsystem Signed-off-by: Dirk Hohndel --- qt-ui/models.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'qt-ui/models.cpp') 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; } -- cgit v1.2.3-70-g09d2