X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/08c8690cf0ea7b961373ecaddecc28bd40403e30..2436cac7772915acbf15c28f3a7f87857bf9f892:/src/msw/combobox.cpp 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