diff --git a/src/gui/codeeditors/qgscodeeditorwidget.cpp b/src/gui/codeeditors/qgscodeeditorwidget.cpp index 930de300b593..324fcf1ebad5 100644 --- a/src/gui/codeeditors/qgscodeeditorwidget.cpp +++ b/src/gui/codeeditors/qgscodeeditorwidget.cpp @@ -418,10 +418,10 @@ bool QgsCodeEditorWidget::loadFile( const QString &path ) { const QString content = file.readAll(); mEditor->setText( content ); - mEditor->setModified( false ); + setFilePath( path ); mEditor->recolor(); + mEditor->setModified( false ); mLastModified = QFileInfo( path ).lastModified(); - setFilePath( path ); return true; } return false; @@ -449,9 +449,9 @@ bool QgsCodeEditorWidget::save( const QString &path ) file.write( mEditor->text().toUtf8() ); file.close(); + setFilePath( filePath ); mEditor->setModified( false ); mLastModified = QFileInfo( filePath ).lastModified(); - setFilePath( filePath ); return true; }