improved msr<->mlog swap dialog.

This commit is contained in:
suter_a 2022-09-02 13:53:34 +02:00
parent 2ba6e8a230
commit b4c7780ff5
2 changed files with 10 additions and 4 deletions

View File

@ -2859,13 +2859,16 @@ void PTextEdit::musrSwapMsrMlog()
return;
}
if (QMessageBox::information(this, "INFO",
QString("Will now swap files: %1 <-> %2").arg(currentFileName).arg(swapFileName),
QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Cancel)
return;
// check if the file needs to be saved
if (fTabWidget->tabText(fTabWidget->currentIndex()).indexOf("*") > 0) { // needs to be saved first
fileSave();
}
QMessageBox::information(nullptr, "INFO", QString("Will now swap files: %1 <-> %2").arg(currentFileName).arg(swapFileName));
// swap files
// copy currentFile -> tempFile

View File

@ -2848,13 +2848,16 @@ void PTextEdit::musrSwapMsrMlog()
return;
}
if (QMessageBox::information(this, "INFO",
QString("Will now swap files: %1 <-> %2").arg(currentFileName).arg(swapFileName),
QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Cancel)
return;
// check if the file needs to be saved
if (fTabWidget->tabText(fTabWidget->currentIndex()).indexOf("*") > 0) { // needs to be saved first
fileSave();
}
QMessageBox::information(nullptr, "INFO", QString("Will now swap files: %1 <-> %2").arg(currentFileName).arg(swapFileName));
// swap files
// copy currentFile -> tempFile