Ticket #14145: auimanager.patch

File auimanager.patch, 1.7 KB (added by Hanmac, 8 years ago)
  • include/wx/aui/framemanager.h

     
    605605protected:
    606606
    607607    // protected events
     608    void OnDestroy(wxWindowDestroyEvent& evt);
    608609    void OnPaint(wxPaintEvent& evt);
    609610    void OnEraseBackground(wxEraseEvent& evt);
    610611    void OnSize(wxSizeEvent& evt);
  • src/aui/framemanager.cpp

     
    599599BEGIN_EVENT_TABLE(wxAuiManager, wxEvtHandler)
    600600    EVT_AUI_PANE_BUTTON(wxAuiManager::OnPaneButton)
    601601    EVT_AUI_RENDER(wxAuiManager::OnRender)
     602    EVT_WINDOW_DESTROY(wxAuiManager::OnDestroy)
    602603    EVT_PAINT(wxAuiManager::OnPaint)
    603604    EVT_ERASE_BACKGROUND(wxAuiManager::OnEraseBackground)
    604605    EVT_SIZE(wxAuiManager::OnSize)
     
    629630    m_dockConstraintY = 0.3;
    630631    m_reserved = NULL;
    631632    m_currentDragItem = -1;
    632 
     633   
    633634    if (managed_wnd)
    634635    {
    635636        SetManagedWindow(managed_wnd);
     
    904905void wxAuiManager::SetManagedWindow(wxWindow* wnd)
    905906{
    906907    wxASSERT_MSG(wnd, wxT("specified window must be non-NULL"));
    907 
     908   
     909    UnInit();
     910   
    908911    m_frame = wnd;
    909912    m_frame->PushEventHandler(this);
    910913
     
    949952    if (m_frame)
    950953    {
    951954        m_frame->RemoveEventHandler(this);
     955        m_frame = NULL;
    952956    }
    953957}
    954958
     
    39363940        delete client_dc;
    39373941}
    39383942
     3943void wxAuiManager::OnDestroy(wxWindowDestroyEvent& event)
     3944{
     3945    if(m_frame == event.GetEventObject())
     3946        UnInit();
     3947}
     3948
    39393949void wxAuiManager::OnPaint(wxPaintEvent& WXUNUSED(event))
    39403950{
    39413951    wxPaintDC dc(m_frame);