From ada13ddebd80d135f41be2a7d517ef57004b3356 Mon Sep 17 00:00:00 2001 From: Jeff Shillitto Date: Tue, 13 Aug 2019 22:17:49 +1000 Subject: [PATCH] Disable undo/redo stack --- src/QtHtmlReader.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/QtHtmlReader.cpp b/src/QtHtmlReader.cpp index d73554cb..0d71c658 100644 --- a/src/QtHtmlReader.cpp +++ b/src/QtHtmlReader.cpp @@ -76,6 +76,11 @@ void QtHtmlReader::Open() //draw text QTextDocument text_document; + + //disable redo/undo stack as not needed + text_document.setUndoRedoEnabled(false); + + //create the HTML/CSS document text_document.setTextWidth(width); text_document.setDefaultStyleSheet(css.c_str()); text_document.setHtml(html.c_str());