From ebdcb4074a566bf1c2d3321049af3c391b5d4d7a Mon Sep 17 00:00:00 2001 From: AngryFender Date: Wed, 21 Aug 2024 22:43:39 +0100 Subject: [PATCH] Github Issue #205: Fixed the issue where already opened files were affected by the MkEdit's context menu option to enable/disable markdown status --- views_handler.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/views_handler.cpp b/views_handler.cpp index 6254f43..7d70bd7 100644 --- a/views_handler.cpp +++ b/views_handler.cpp @@ -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); @@ -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);