]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't assert in update handler if read-only
authorJulian Smart <julian@anthemion.co.uk>
Sun, 26 Aug 2007 13:49:19 +0000 (13:49 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sun, 26 Aug 2007 13:49:19 +0000 (13:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48392 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/combobox.cpp

index 9a3f40c65352ff19959fecdb538274a169ef988d..8ced0946381fcc14b0a3a5e15a6477582dcb3196 100644 (file)
@@ -374,7 +374,7 @@ bool wxComboBox::MSWShouldPreProcessMessage(WXMSG *pMsg)
     if (wxIsCtrlDown())
     {
         WPARAM vkey = pMsg->wParam;
-        
+
         switch (vkey)
         {
             case 'C':
@@ -387,7 +387,7 @@ bool wxComboBox::MSWShouldPreProcessMessage(WXMSG *pMsg)
                 return false;
         }
     }
-    
+
     return wxChoice::MSWShouldPreProcessMessage(pMsg);
 }
 
@@ -799,12 +799,12 @@ void wxComboBox::OnUpdateRedo(wxUpdateUIEvent& event)
 
 void wxComboBox::OnUpdateDelete(wxUpdateUIEvent& event)
 {
-    event.Enable(HasSelection() && IsEditable());
+    event.Enable(IsEditable() && HasSelection());
 }
 
 void wxComboBox::OnUpdateSelectAll(wxUpdateUIEvent& event)
 {
-    event.Enable(GetLastPosition() > 0);
+    event.Enable(IsEditable() && GetLastPosition() > 0);
 }
 
 #endif // wxUSE_COMBOBOX