Merge pull request #788 from OskarLinde/autoreload_undo_fix

auto-reload & compile with internal editor preserve undo status
master
Marius Kintel 2014-05-12 13:40:30 -04:00
commit eb98e55477
1 changed files with 2 additions and 1 deletions

View File

@ -657,7 +657,8 @@ void MainWindow::refreshDocument()
reader.setCodec("UTF-8");
QString text = reader.readAll();
PRINTB("Loaded design '%s'.", this->fileName.toLocal8Bit().constData());
editor->setPlainText(text);
if (editor->toPlainText() != text)
editor->setPlainText(text);
}
}
setCurrentOutput();