]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied patch in #12279: in wxRichTextCtrl, when wxRE_READONLY is set, the undo,...
authorJulian Smart <julian@anthemion.co.uk>
Fri, 25 Feb 2011 12:25:12 +0000 (12:25 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Fri, 25 Feb 2011 12:25:12 +0000 (12:25 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/richtext/richtextctrl.cpp

index 08f62df425ead925a73c8cb58391ee38cc666709..cbe4d43fc8b06a0dd476f22f699485953e36ae7c 100644 (file)
@@ -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();
 }
 
 // ----------------------------------------------------------------------------