Don't re-enter wxComboCtrlBase::HidePopup
Under wxMSW this method is re-entered due to triggering EVT_ACTIVATE when EVT_LEFT_UP is being already handled. We need to prevent this to avoid generating spurious EVT_TEXT events and raising errors on calling SetFocus(). Closes #18260.
This commit is contained in:
@@ -455,7 +455,7 @@ public:
|
|||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
Hidden = 0,
|
Hidden = 0,
|
||||||
//Closing = 1,
|
Closing = 1,
|
||||||
Animating = 2,
|
Animating = 2,
|
||||||
Visible = 3
|
Visible = 3
|
||||||
};
|
};
|
||||||
|
@@ -2571,8 +2571,9 @@ void wxComboCtrlBase::OnPopupDismiss(bool generateEvent)
|
|||||||
void wxComboCtrlBase::HidePopup(bool generateEvent)
|
void wxComboCtrlBase::HidePopup(bool generateEvent)
|
||||||
{
|
{
|
||||||
// Should be able to call this without popup interface
|
// Should be able to call this without popup interface
|
||||||
if ( IsPopupWindowState(Hidden) )
|
if ( IsPopupWindowState(Hidden) || IsPopupWindowState(Closing) )
|
||||||
return;
|
return;
|
||||||
|
m_popupWinState = Closing; // To prevent from reentering
|
||||||
|
|
||||||
// transfer value and show it in textctrl, if any
|
// transfer value and show it in textctrl, if any
|
||||||
if ( !IsPopupWindowState(Animating) )
|
if ( !IsPopupWindowState(Animating) )
|
||||||
|
Reference in New Issue
Block a user