While editing the left button is renamed to "OK" to accept the changes

This seemed more logical than keeping it as "edit" and basically having to
hit "edit" a second time in order to save a change.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-05-18 21:33:04 -07:00
parent 046eacabe5
commit ba30d070c9

View file

@ -231,9 +231,11 @@ void MainTab::on_editNotes_clicked(bool edit)
notesBackup.divemaster = ui->divemaster->text();
notesBackup.location = ui->location->text();
notesBackup.rating = ui->rating->currentStars();
ui->editNotes->setText(tr("OK"));
}
else{
ui->diveNotesMessage->animatedHide();
ui->editNotes->setText(tr("edit"));
}
}
@ -242,6 +244,7 @@ void MainTab::on_resetNotes_clicked()
if (!ui->editNotes->isChecked())
return;
ui->editNotes->setText(tr("edit"));
ui->buddy->setText(notesBackup.buddy);
ui->suit->setText(notesBackup.suit);
ui->notes->setText(notesBackup.notes);