]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't try to call CanUndo/CanRedo for read-only combobox since we'll get an assert.
authorJulian Smart <julian@anthemion.co.uk>
Wed, 14 Nov 2007 15:01:33 +0000 (15:01 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Wed, 14 Nov 2007 15:01:33 +0000 (15:01 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/combobox.cpp

index bd3650dc3b47b0e18db87cb87f536dc554532a34..c6a03a07cc2ee1df107a899b387ef906de6a1ad2 100644 (file)
@@ -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)