X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5644933fa64abf5a122e3f15d0a66d415a63c35b..69659fd770f615210efac4b4fa741b3ad6223616:/src/common/wincmn.cpp?ds=sidebyside diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 49417dbaf7..a48533d968 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -318,23 +318,9 @@ wxWindowBase::~wxWindowBase() wxASSERT_MSG( GetChildren().GetCount() == 0, wxT("children not destroyed") ); - // reset the top-level parent's default item if it is this widget + // notify the parent about this window destruction if ( m_parent ) - { - wxTopLevelWindow *tlw = wxDynamicCast(wxGetTopLevelParent((wxWindow*)this), - wxTopLevelWindow); - - if ( tlw && tlw->GetDefaultItem() == this ) - tlw->SetDefaultItem(NULL); - if ( tlw && tlw->GetTmpDefaultItem() == this ) - tlw->SetTmpDefaultItem(NULL); - } - - // reset the dangling pointer our parent window may keep to us - if ( m_parent ) - { m_parent->RemoveChild(this); - } #if wxUSE_CARET delete m_caret; @@ -497,18 +483,7 @@ wxSize wxWindowBase::DoGetBestSize() const if ( m_windowSizer ) { - // Adjust to window size, since the return value of GetWindowSizeForVirtualSize is - // expressed in window and not client size - wxSize minSize = m_windowSizer->GetMinSize(); - wxSize size(GetSize()); - wxSize clientSize(GetClientSize()); - - wxSize minWindowSize(minSize.x + size.x - clientSize.x, - minSize.y + size.y - clientSize.y); - - best = GetWindowSizeForVirtualSize(minWindowSize); - - return best; + best = m_windowSizer->GetMinSize(); } #if wxUSE_CONSTRAINTS else if ( m_constraints ) @@ -2373,9 +2348,9 @@ void wxWindowBase::OnMiddleClick( wxMouseEvent& event ) wxMessageBox(msg, _T("wxWidgets information"), wxICON_INFORMATION | wxOK, (wxWindow *)this); +#endif // wxUSE_MSGDLG } else -#endif // wxUSE_MSGDLG { event.Skip(); }