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
This commit is contained in:
parent
f062c0e2ee
commit
9b433fceec
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user