Don't ask about differences over after the user has said no -- until the external file changes again.

This commit is contained in:
Howard Stearns 2016-03-17 19:58:28 -07:00
parent d59d5549a1
commit 0cbddb217c

View file

@ -224,7 +224,8 @@ void ScriptEditorWidget::onWindowActivated() {
if (!_isReloading) {
_isReloading = true;
if (QFileInfo(_currentScript).lastModified() > _currentScriptModified) {
QDateTime fileStamp = QFileInfo(_currentScript).lastModified();
if (fileStamp > _currentScriptModified) {
bool doReload = false;
auto window = static_cast<ScriptEditorWindow*>(this->parent()->parent()->parent());
window->inModalDialog = true;
@ -245,6 +246,8 @@ void ScriptEditorWidget::onWindowActivated() {
setRunning(false);
// Script is restarted once current script instance finishes.
}
} else {
_currentScriptModified = fileStamp; // Asked and answered. Don't ask again until the external file is changed again.
}
}
_isReloading = false;