From 3a4a38c1432412277235562ec561bad73b61574d Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 25 Feb 2011 12:25:12 +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/trunk@67022 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 08f62df425..cbe4d43fc8 100644 --- a/src/richtext/richtextctrl.cpp +++ b/src/richtext/richtextctrl.cpp @@ -3012,12 +3012,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(); } // ---------------------------------------------------------------------------- -- 2.45.2