summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-11-21 23:38:28 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-22 07:35:03 -0800
commit7ed2fde7787185df6d6635466866f29a86d1f250 (patch)
tree007d468b96886ce63777be781caada1b3f6b0502 /qt-ui
parentcdac73792590dd66e39a9a14c09c56b14c485fe6 (diff)
downloadsubsurface-7ed2fde7787185df6d6635466866f29a86d1f250.tar.gz
Small code cleanup on the CylindersModel
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/models.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index 71e0ec19d..ae156cbbc 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -92,14 +92,8 @@ QVariant CylindersModel::data(const QModelIndex& index, int role) const
case Qt::FontRole: {
QFont font = defaultModelFont();
switch (index.column()) {
- case START:
- if (!cyl->start.mbar)
- font.setItalic(true);
- break;
- case END:
- if (!cyl->end.mbar)
- font.setItalic(true);
- break;
+ case START: font.setItalic(!cyl->start.mbar); break;
+ case END: font.setItalic(!cyl->end.mbar); break;
}
ret = font;
break;