From 9b433fceec30daf5d4b975e41ad0de926e75d9ce Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 4 Feb 2005 21:35:54 +0000 Subject: [PATCH] Fix for assertions when updating UI and focus is on read-only combobox git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31758 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/combobox.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index 642e48329a..0bd353a41a 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -558,6 +558,9 @@ void wxComboBox::SelectAll() bool wxComboBox::CanUndo() const { + if (!IsEditable()) + return false; + HWND hEditWnd = (HWND) GetEditHWND() ; if ( hEditWnd ) return ::SendMessage(hEditWnd, EM_CANUNDO, 0, 0) != 0; @@ -567,6 +570,9 @@ bool wxComboBox::CanUndo() const bool wxComboBox::CanRedo() const { + if (!IsEditable()) + return false; + HWND hEditWnd = (HWND) GetEditHWND() ; if ( hEditWnd ) return ::SendMessage(hEditWnd, EM_CANUNDO, 0, 0) != 0; @@ -589,7 +595,7 @@ bool wxComboBox::CanCopy() const bool wxComboBox::CanCut() const { - return CanCopy() && IsEditable(); + return IsEditable() && CanCopy() ; } bool wxComboBox::CanPaste() const -- 2.45.2