From 754112beb4c8ef7f03d72cc8fb9c04a79e85c8a2 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 27 Dec 2016 13:10:18 -0800 Subject: 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 --- desktop-widgets/renumber.ui | 15 ++++++++++++++- desktop-widgets/simplewidgets.cpp | 10 ++++++++-- 2 files changed, 22 insertions(+), 3 deletions(-) (limited to 'desktop-widgets') 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 @@ - New starting number + Renumbering all dives @@ -55,6 +55,19 @@ 0 + + + + New starting number + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + true + + + 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; } -- cgit v1.2.3-70-g09d2