improved msr<->mlog swap dialog.

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

View File

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

View File

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