From 65d8b8e32984cc51f78077fffe4502e3c828b7da Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 25 Feb 2011 12:25:45 +0000 Subject: [PATCH] Applied patch in #12279: in wxRichTextCtrl, when wxRE_READONLY is set, the undo, redo function should be disabled git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@67023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/richtext/richtextctrl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/richtext/richtextctrl.cpp b/src/richtext/richtextctrl.cpp index a336ef4da8..225f84ad69 100644 --- a/src/richtext/richtextctrl.cpp +++ b/src/richtext/richtextctrl.cpp @@ -2718,12 +2718,12 @@ void wxRichTextCtrl::Redo() bool wxRichTextCtrl::CanUndo() const { - return GetCommandProcessor()->CanUndo(); + return GetCommandProcessor()->CanUndo() && IsEditable(); } bool wxRichTextCtrl::CanRedo() const { - return GetCommandProcessor()->CanRedo(); + return GetCommandProcessor()->CanRedo() && IsEditable(); } // ----------------------------------------------------------------------------