Commit a212fe70 authored by Michel Ludwig's avatar Michel Ludwig
Browse files

Fix the reloading of the document after live preview compilations

Thanks to Eugene Shalygin for suggesting the fix!

BUG: 323053
parent 913219a3
......@@ -728,7 +728,7 @@ void LivePreviewManager::handleCursorPositionChangedTimeout()
synchronizeViewWithCursor(latexInfo, view, view->cursorPosition(), true); // called from a cursor position change
// Note: this method won't open a document again if it's opened already
// Note: this method won't open a document again if it's open already
bool LivePreviewManager::ensureDocumentIsOpenInViewer(PreviewInformation *previewInformation, bool *hadToOpen)
if(hadToOpen) {
......@@ -1380,14 +1380,16 @@ void LivePreviewManager::updatePreviewInformationAfterCompilationFinished()
if(!m_synchronizeViewWithCursorAction->isChecked()) {
if(!hadToOpen) {
// as 'ensureDocumentIsOpenInViewer' won't reload when the document is open
// already, we have to do it here
if(!hadToOpen) {
else {
if(m_synchronizeViewWithCursorAction->isChecked()) {
synchronizeViewWithCursor(m_runningLaTeXInfo, m_runningTextView, m_runningTextView->cursorPosition());
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment