mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
cleanup: remove lastMode variable in MainTab::rejectChanges()
This stored the old editMode. However, it was not read after editMode was changed, so there is no point to it. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
5f858e137d
commit
150bd9763e
1 changed files with 1 additions and 3 deletions
|
@ -540,9 +540,7 @@ void MainTab::acceptChanges()
|
||||||
|
|
||||||
void MainTab::rejectChanges()
|
void MainTab::rejectChanges()
|
||||||
{
|
{
|
||||||
EditMode lastMode = editMode;
|
if (editMode != NONE && current_dive) {
|
||||||
|
|
||||||
if (lastMode != NONE && current_dive) {
|
|
||||||
if (QMessageBox::warning(MainWindow::instance(), TITLE_OR_TEXT(tr("Discard the changes?"),
|
if (QMessageBox::warning(MainWindow::instance(), TITLE_OR_TEXT(tr("Discard the changes?"),
|
||||||
tr("You are about to discard your changes.")),
|
tr("You are about to discard your changes.")),
|
||||||
QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Discard) != QMessageBox::Discard) {
|
QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Discard) != QMessageBox::Discard) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue