Skip to content

Commit

Permalink
Core plugin: some minor improvement to the reloading of a file.
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Apr 29, 2018
1 parent 31b4adc commit 4032c43
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/plugins/miscellaneous/Core/src/centralwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1006,8 +1006,6 @@ void CentralWidget::reloadFile(int pIndex, bool pForce)
}
} else {
fileManagerInstance->reload(fileName);

fileManagerInstance->setModified(fileName, false);
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/plugins/miscellaneous/Core/src/filemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,11 @@ void FileManager::reload(const QString &pFileName)
file->reset();

emit fileReloaded(fileName);

// Reset our modified state and let people know about it, if needed

if (file->setModified(false))
emit fileModified(fileName);
}
}

Expand Down

0 comments on commit 4032c43

Please sign in to comment.