From cf72b6c11182ed981bee6366868b6fc3428ea3f1 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 16 Oct 2014 10:13:48 +0000 Subject: [PATCH] Don't calculate refresh optimizations if we're not going to use them git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/richtext/richtextbuffer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index d47130714f..47057c87b7 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -11580,6 +11580,10 @@ void wxRichTextAction::CalculateRefreshOptimizations(wxArrayInt& optimizationLin if (!container) return; + // No point in doing optimizations if we're not going to use them + if (m_ctrl && m_ctrl->IsFrozen()) + return; + // NOTE: we're assuming that the buffer is laid out correctly at this point. // If we had several actions, which only invalidate and leave layout until the // paint handler is called, then this might not be true. So we may need to switch