fixes for several fatal problems when using wxComboCtrl as popup (patch 1539124)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40589 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -191,7 +191,7 @@ void wxComboFrameEventHandler::OnIdle( wxIdleEvent& event )
|
||||
{
|
||||
wxWindow* winFocused = ::wxWindow::FindFocus();
|
||||
|
||||
wxWindow* popup = m_combo->GetPopupControl();
|
||||
wxWindow* popup = m_combo->GetPopupControl()->GetControl();
|
||||
wxWindow* winpopup = m_combo->GetPopupWindow();
|
||||
|
||||
if (
|
||||
@@ -1342,6 +1342,15 @@ bool wxComboCtrlBase::PreprocessMouseEvent( wxMouseEvent& event,
|
||||
wxLongLong t = ::wxGetLocalTimeMillis();
|
||||
int evtType = event.GetEventType();
|
||||
|
||||
#if !USE_TRANSIENT_POPUP
|
||||
if ( m_isPopupShown &&
|
||||
( evtType == wxEVT_LEFT_DOWN || evtType == wxEVT_RIGHT_DOWN ) )
|
||||
{
|
||||
HidePopup();
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
//
|
||||
// Generate our own double-clicks
|
||||
// (to allow on-focus dc-event on double-clicks instead of triple-clicks)
|
||||
@@ -1541,13 +1550,13 @@ void wxComboCtrlBase::CreatePopup()
|
||||
// Destroy popup window and the child control
|
||||
void wxComboCtrlBase::DestroyPopup()
|
||||
{
|
||||
HidePopup();
|
||||
|
||||
if ( m_popup )
|
||||
m_popup->RemoveEventHandler(m_popupExtraHandler);
|
||||
|
||||
delete m_popupExtraHandler;
|
||||
|
||||
HidePopup();
|
||||
|
||||
delete m_popupInterface;
|
||||
|
||||
if ( m_winPopup )
|
||||
|
Reference in New Issue
Block a user