Skip to content

Commit

Permalink
Github Issue #205: Fixed the issue where already opened files were af…
Browse files Browse the repository at this point in the history
…fected by the MkEdit's context menu option to enable/disable markdown status
  • Loading branch information
AngryFender committed Aug 21, 2024
1 parent df1ebe2 commit ebdcb40
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions views_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,8 @@ ViewsHandler::DOCUMENT_STATUS ViewsHandler::setCurrentDocument(const QFileInfo &
viewTitle->setText(currentDocument->getFileName());

viewText->setDocument(currentDocument.data());
currentDocument.data()->setMarkdownHandle(markdown);
connectDocument();
viewText->setMkState(markdown); //after connectDocuments();

QTextCursor cursor = viewText->textCursor();
cursor.movePosition(QTextCursor::End,QTextCursor::MoveAnchor);
Expand All @@ -436,8 +436,7 @@ ViewsHandler::DOCUMENT_STATUS ViewsHandler::setCurrentDocument(const QFileInfo &
viewTitle->setText(currentDocument.data()->getFileName());
viewText->setDocument(currentDocument.data());


viewText->setMkState(markdown); //before connectDocuments();
currentDocument.data()->setMarkdownHandle(markdown);
connectDocument();
currentDocument->setDefaultFont(font);
viewText->setFont(font);
Expand Down

0 comments on commit ebdcb40

Please sign in to comment.