Skip to content

Commit

Permalink
fix #220
Browse files Browse the repository at this point in the history
  • Loading branch information
sunderme committed Jul 4, 2018
1 parent b7ef662 commit 016cab9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/texstudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7939,6 +7939,10 @@ void Texstudio::clearPreview()
for (int j = currentEditorView()->autoPreviewCursor.size() - 1; j >= 0; j--)
if (currentEditorView()->autoPreviewCursor[j].selectionStart().lineNumber() <= i &&
currentEditorView()->autoPreviewCursor[j].selectionEnd().lineNumber() >= i) {
// remove cookies from last previewed line
int el=currentEditorView()->autoPreviewCursor[j].selectionEnd().lineNumber();
edit->document()->line(el).removeCookie(QDocumentLine::PICTURE_COOKIE);
edit->document()->line(el).removeCookie(QDocumentLine::PICTURE_COOKIE_DRAWING_POS);
// remove mark
int sid = edit->document()->getFormatId("previewSelection");
if (!sid) return;
Expand Down

0 comments on commit 016cab9

Please sign in to comment.