summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-12-27 13:10:18 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-12-27 13:10:18 -0800
commit754112beb4c8ef7f03d72cc8fb9c04a79e85c8a2 (patch)
treee19fafcc319e6888aec3a02d62545f27147359ab /desktop-widgets
parent4db80aa1a404dc4eba12cceb7d09194729155e1f (diff)
downloadsubsurface-754112beb4c8ef7f03d72cc8fb9c04a79e85c8a2.tar.gz
Renumber ui: make it obvious which dives get renumbered
Using the menu entry or Ctrl-R is designed to renumber all dives, but using the context menu renumbers only the selected dives. With this change it becomes more obvious to the user what's happening. Fixes #942 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/renumber.ui15
-rw-r--r--desktop-widgets/simplewidgets.cpp10
2 files changed, 22 insertions, 3 deletions
diff --git a/desktop-widgets/renumber.ui b/desktop-widgets/renumber.ui
index 00e7b84bb..5580f5cce 100644
--- a/desktop-widgets/renumber.ui
+++ b/desktop-widgets/renumber.ui
@@ -40,7 +40,7 @@
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
- <string>New starting number</string>
+ <string>Renumbering all dives</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
@@ -56,6 +56,19 @@
<number>0</number>
</property>
<item>
+ <widget class="QLabel" name="renumberText">
+ <property name="text">
+ <string>New starting number</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
<widget class="QSpinBox" name="spinBox">
<property name="maximum">
<number>99999</number>
diff --git a/desktop-widgets/simplewidgets.cpp b/desktop-widgets/simplewidgets.cpp
index add4c80de..4a0649626 100644
--- a/desktop-widgets/simplewidgets.cpp
+++ b/desktop-widgets/simplewidgets.cpp
@@ -137,9 +137,15 @@ RenumberDialog *RenumberDialog::instance()
void RenumberDialog::renumberOnlySelected(bool selected)
{
if (selected && amount_selected == 1)
- ui.groupBox->setTitle(tr("New number"));
+ ui.renumberText->setText(tr("New number"));
else
- ui.groupBox->setTitle(tr("New starting number"));
+ ui.renumberText->setText(tr("New starting number"));
+
+ if (selected)
+ ui.groupBox->setTitle(tr("Renumber selected dives"));
+ else
+ ui.groupBox->setTitle(tr("Renumber all dives"));
+
selectedOnly = selected;
}