From abda578832da0b40542907d9fefae5e9cf49bb24 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Thu, 11 Apr 2002 15:31:58 +0000 Subject: [PATCH] RemoveChild added for correct disposal of scrollbar git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15094 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/window.cpp | 10 ++++++++++ src/mac/window.cpp | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index ce34604fa1..fd36642550 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -1072,6 +1072,16 @@ void wxWindowMac::MacPaintBorders( int left , int top ) } } +void wxWindowMac::RemoveChild( wxWindowBase *child ) +{ + if ( child == m_hScrollBar ) + m_hScrollBar = NULL ; + if ( child == m_vScrollBar ) + m_vScrollBar = NULL ; + + wxWindowBase::RemoveChild( child ) ; +} + // New function that will replace some of the above. void wxWindowMac::SetScrollbar(int orient, int pos, int thumbVisible, int range, bool refresh) diff --git a/src/mac/window.cpp b/src/mac/window.cpp index ce34604fa1..fd36642550 100644 --- a/src/mac/window.cpp +++ b/src/mac/window.cpp @@ -1072,6 +1072,16 @@ void wxWindowMac::MacPaintBorders( int left , int top ) } } +void wxWindowMac::RemoveChild( wxWindowBase *child ) +{ + if ( child == m_hScrollBar ) + m_hScrollBar = NULL ; + if ( child == m_vScrollBar ) + m_vScrollBar = NULL ; + + wxWindowBase::RemoveChild( child ) ; +} + // New function that will replace some of the above. void wxWindowMac::SetScrollbar(int orient, int pos, int thumbVisible, int range, bool refresh) -- 2.50.0