aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-10-04 14:28:49 -0300
committerGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-10-04 14:28:49 -0300
commit3c97cc5b6aef9dad9b8a9067b8c3e207a67ab314 (patch)
tree05133909eec9c78b6cf3c3305e01f08fe47d2144 /qt-ui
parent30bee57b60526dcdf675a0606e72b980a67af17b (diff)
downloadsubsurface-3c97cc5b6aef9dad9b8a9067b8c3e207a67ab314.tar.gz
Fix showing all columns by default on first run.
Some columns are a nice addition, but not a must have, and thus are hidden-by-default, uncluttering the user interface. This was discussed with a few designers before writting the code, and also discussed with dirk on irc. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/divelistview.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp
index 0996130c4..6ed77fb19 100644
--- a/qt-ui/divelistview.cpp
+++ b/qt-ui/divelistview.cpp
@@ -192,7 +192,16 @@ void DiveListView::reloadHeaderActions()
QString title = QString("%1").arg(model()->headerData(i, Qt::Horizontal).toString());
QString settingName = QString("showColumn%1").arg(i);
QAction *a = new QAction(title, header());
- bool shown = s.value(settingName, true).toBool();
+ bool showHeaderFirstRun = !(
+ i == DiveTripModel::MAXCNS
+ || i == DiveTripModel::NITROX
+ || i == DiveTripModel::OTU
+ || i == DiveTripModel::TEMPERATURE
+ || i == DiveTripModel::TOTALWEIGHT
+ || i == DiveTripModel::SUIT
+ || i == DiveTripModel::CYLINDER
+ || i == DiveTripModel::SAC );
+ bool shown = s.value(settingName, showHeaderFirstRun).toBool();
a->setCheckable(true);
a->setChecked(shown);
a->setProperty("index", i);