summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/locationinformation.cpp4
-rw-r--r--qt-ui/modeldelegates.cpp3
2 files changed, 3 insertions, 4 deletions
diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp
index 39a8341cd..2e296450d 100644
--- a/qt-ui/locationinformation.cpp
+++ b/qt-ui/locationinformation.cpp
@@ -256,8 +256,8 @@ void LocationManagementEditHelper::handleActivation(const QModelIndex& activated
activated.row(), LocationInformationModel::UUID);
last_uuid = uuidIdx.data().toInt();
- // Special case: first option, add dive site.
- if (activated.row() == 0) {
+ // Special case: first two options: add dive site.
+ if (activated.row() < 2) {
qDebug() << "Setting to " << activated.data().toString();
emit setLineEditText(activated.data().toString());
}
diff --git a/qt-ui/modeldelegates.cpp b/qt-ui/modeldelegates.cpp
index 4a54eebf0..a3978ce54 100644
--- a/qt-ui/modeldelegates.cpp
+++ b/qt-ui/modeldelegates.cpp
@@ -503,9 +503,8 @@ void LocationFilterDelegate::paint(QPainter *painter, const QStyleOptionViewItem
struct dive_site *ds = get_dive_site_by_uuid(
index.model()->data(index.model()->index(index.row(),0)).toInt()
);
-
//Special case: do not show name, but instead, show
- if (index.row() == 0) {
+ if (index.row() < 2) {
diveSiteName = index.data().toString();
bottomText = index.data(Qt::ToolTipRole).toString();
goto print_part;