diff --git a/src/musredit_qt5/musredit/PTextEdit.cpp b/src/musredit_qt5/musredit/PTextEdit.cpp index dabc4f2d..fe9ccc55 100644 --- a/src/musredit_qt5/musredit/PTextEdit.cpp +++ b/src/musredit_qt5/musredit/PTextEdit.cpp @@ -1342,8 +1342,10 @@ void PTextEdit::fileSave() fileSaveAs(); } else { QFile file( *fFilenames.find( currentEditor() ) ); - if ( !file.open( QIODevice::WriteOnly ) ) + if ( !file.open( QIODevice::WriteOnly ) ) { + QMessageBox::critical(this, "**ERROR**", "Couldn't save the file!\nDisk full?\nNo write access?"); return; + } QTextStream ts( &file ); ts << currentEditor()->toPlainText(); @@ -1374,7 +1376,6 @@ void PTextEdit::fileSaveAs() fFilenames.remove( currentEditor() ); fFilenames.insert( currentEditor(), fn ); fileSave(); - fTabWidget->setTabText(fTabWidget->indexOf( currentEditor() ), QFileInfo(fn).fileName()); } fileSystemWatcherActivation(); // delayed activation of fFileSystemWatcherActive