From: Julian Smart Date: Wed, 14 Nov 2007 15:01:33 +0000 (+0000) Subject: Don't try to call CanUndo/CanRedo for read-only combobox since we'll get an assert. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c0e15042c39a034ef7e2b1441b13bde8c4014669 Don't try to call CanUndo/CanRedo for read-only combobox since we'll get an assert. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index bd3650dc3b..c6a03a07cc 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -610,12 +610,12 @@ void wxComboBox::OnUpdatePaste(wxUpdateUIEvent& event) void wxComboBox::OnUpdateUndo(wxUpdateUIEvent& event) { - event.Enable( CanUndo() ); + event.Enable( IsEditable() && CanUndo() ); } void wxComboBox::OnUpdateRedo(wxUpdateUIEvent& event) { - event.Enable( CanRedo() ); + event.Enable( IsEditable() && CanRedo() ); } void wxComboBox::OnUpdateDelete(wxUpdateUIEvent& event)