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
This commit is contained in:
Julian Smart
2011-02-25 12:25:45 +00:00
parent adf4619d45
commit 65d8b8e329

View File

@@ -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();
}
// ----------------------------------------------------------------------------