clean-up and fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38436 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -80,8 +80,6 @@ public:
|
|||||||
~wxToolBarTool()
|
~wxToolBarTool()
|
||||||
{
|
{
|
||||||
ClearControl();
|
ClearControl();
|
||||||
if ( m_controlHandle )
|
|
||||||
DisposeControl( m_controlHandle );
|
|
||||||
|
|
||||||
#if wxMAC_USE_NATIVE_TOOLBAR
|
#if wxMAC_USE_NATIVE_TOOLBAR
|
||||||
if ( m_toolbarItemRef )
|
if ( m_toolbarItemRef )
|
||||||
@@ -104,6 +102,11 @@ public:
|
|||||||
void ClearControl()
|
void ClearControl()
|
||||||
{
|
{
|
||||||
m_control = NULL;
|
m_control = NULL;
|
||||||
|
if ( m_controlHandle )
|
||||||
|
{
|
||||||
|
DisposeControl( m_controlHandle );
|
||||||
|
m_controlHandle = NULL ;
|
||||||
|
}
|
||||||
|
|
||||||
#if wxMAC_USE_NATIVE_TOOLBAR
|
#if wxMAC_USE_NATIVE_TOOLBAR
|
||||||
m_toolbarItemRef = NULL;
|
m_toolbarItemRef = NULL;
|
||||||
@@ -1310,8 +1313,6 @@ bool wxToolBar::DoDeleteTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolbase)
|
|||||||
case wxTOOL_STYLE_SEPARATOR:
|
case wxTOOL_STYLE_SEPARATOR:
|
||||||
if ( tool->GetControlHandle() )
|
if ( tool->GetControlHandle() )
|
||||||
{
|
{
|
||||||
DisposeControl( (ControlRef) tool->GetControlHandle() );
|
|
||||||
|
|
||||||
#if wxMAC_USE_NATIVE_TOOLBAR
|
#if wxMAC_USE_NATIVE_TOOLBAR
|
||||||
if ( removeIndex != -1 && m_macHIToolbarRef )
|
if ( removeIndex != -1 && m_macHIToolbarRef )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user