From 5a0259e657136dad29d9f249ebc31f8e8b315ed0 Mon Sep 17 00:00:00 2001
From: Julian Smart <julian@anthemion.co.uk>
Date: Sun, 8 Jul 2012 10:28:27 +0000
Subject: [PATCH] Fix for scroll position being changed when partial layout is
 done

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71982 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 src/richtext/richtextctrl.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/richtext/richtextctrl.cpp b/src/richtext/richtextctrl.cpp
index e0e80081a1..3d7a97adb4 100644
--- a/src/richtext/richtextctrl.cpp
+++ b/src/richtext/richtextctrl.cpp
@@ -3896,7 +3896,7 @@ bool wxRichTextCtrl::LayoutContent(bool onlyVisibleRect)
         GetBuffer().Layout(dc, context, availableSpace, availableSpace, flags);
         GetBuffer().Invalidate(wxRICHTEXT_NONE);
 
-        if (!IsFrozen())
+        if (!IsFrozen() && !onlyVisibleRect)
             SetupScrollbars();
     }
 
-- 
2.45.2