Show a different message when editing more than one dive

I still wonder if we have all the semantics correct for multi dive
editing. This will need more testing.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-11-05 15:57:24 +09:00
parent e90f5c28df
commit 0f66e7a025

View file

@ -137,9 +137,14 @@ void MainTab::enableEdition(EditMode newEditMode)
notesBackup[NULL].location = ui.location->text();
editMode = TRIP;
} else {
ui.diveNotesMessage->setText(tr("This dive is being edited. Select Save or Undo when ready."));
if (amount_selected > 1) {
ui.diveNotesMessage->setText(tr("Multiple dives are being edited. Select Save or Undo when ready."));
ui.diveEquipmentMessage->setText(tr("Multiple dives are being edited. Select Save or Undo when ready."));
} else {
ui.diveNotesMessage->setText(tr("This dive is being edited. Select Save or Undo when ready."));
ui.diveEquipmentMessage->setText(tr("This dive is being edited. Select Save or Undo when ready."));
}
ui.diveNotesMessage->animatedShow();
ui.diveEquipmentMessage->setText(tr("This dive is being edited. Select Save or Undo when ready."));
ui.diveEquipmentMessage->animatedShow();
// We may be editing one or more dives here. backup everything.