X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1d156af3247c862e51a7c62f569a3fd302052a42..d57d0505d4c2186592833f18c3d40532d3a4bf0e:/src/common/combocmn.cpp diff --git a/src/common/combocmn.cpp b/src/common/combocmn.cpp index 814dbd9a49..438a3e2790 100644 --- a/src/common/combocmn.cpp +++ b/src/common/combocmn.cpp @@ -489,9 +489,8 @@ bool wxComboPopupWindow::Show( bool show ) m_inShow++; - wxASSERT( IsKindOf(CLASSINFO(wxPopupTransientWindow)) ); - - wxPopupTransientWindow* ptw = (wxPopupTransientWindow*) this; + wxPopupTransientWindow* const + ptw = static_cast(this); if ( show != ptw->IsShown() ) { @@ -518,7 +517,7 @@ bool wxComboPopupWindow::ProcessLeftDown(wxMouseEvent& event) void wxComboPopupWindow::OnDismiss() { wxComboCtrlBase* combo = (wxComboCtrlBase*) GetParent(); - wxASSERT_MSG( combo->IsKindOf(CLASSINFO(wxComboCtrlBase)), + wxASSERT_MSG( wxDynamicCast(combo, wxComboCtrlBase), wxT("parent might not be wxComboCtrl, but check IMPLEMENT_DYNAMIC_CLASS(2) macro for correctness") ); combo->OnPopupDismiss(true); @@ -766,7 +765,7 @@ void wxComboBoxExtraInputHandler::OnFocus(wxFocusEvent& event) if ( m_combo->GetTextCtrl() ) m_combo->GetTextCtrl()->SelectAll(); else - m_combo->SetSelection(-1,-1); + m_combo->SelectAll(); } // Send focus indication to parent. @@ -1375,7 +1374,7 @@ wxSize wxComboCtrlBase::DoGetBestSize() const else fhei = sizeText.y + 4; - // Need to force height to accomodate bitmap? + // Need to force height to accommodate bitmap? int btnSizeY = m_btnSize.y; if ( m_bmpNormal.IsOk() && fhei < btnSizeY ) fhei = btnSizeY;