From 1675e641e6a57cf2f2bec944b3bd761b4d6f4fb2 Mon Sep 17 00:00:00 2001 From: JulianSmart Date: Sat, 14 Nov 2015 18:44:45 +0000 Subject: [PATCH] Implement freeze/thaw in Do/Undo to considerably speed up commands with a large number of actions --- include/wx/richtext/richtextbuffer.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/wx/richtext/richtextbuffer.h b/include/wx/richtext/richtextbuffer.h index b7e2608c8c..bf53ffa7b4 100644 --- a/include/wx/richtext/richtextbuffer.h +++ b/include/wx/richtext/richtextbuffer.h @@ -6375,9 +6375,16 @@ public: */ wxList& GetActions() { return m_actions; } + /** + Indicate whether the control should be frozen when performing Do/Undo + */ + bool GetFreeze() const { return m_freeze; } + void SetFreeze(bool freeze) { m_freeze = freeze; } + protected: wxList m_actions; + bool m_freeze; }; /** @@ -6448,6 +6455,11 @@ public: */ wxRichTextObject* GetObject() const { return m_object; } + /** + Returns the associated rich text control. + */ + wxRichTextCtrl* GetRichTextCtrl() const { return m_ctrl; } + /** Stores the object to replace the one at the position defined by the container address without making an address for it (cf SetObject() and MakeObject()).