The mac toolbar was redrawing buttons when not shown -

making them appear at arbitrary times.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13071 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2001-12-18 11:31:55 +00:00
parent 501d97d4fe
commit e044f6001e
2 changed files with 488 additions and 476 deletions

View File

@@ -527,6 +527,9 @@ wxString wxToolBar::MacGetToolTipString( wxPoint &pt )
void wxToolBar::DoEnableTool(wxToolBarToolBase *t, bool enable) void wxToolBar::DoEnableTool(wxToolBarToolBase *t, bool enable)
{ {
if (!IsShown())
return ;
wxToolBarTool *tool = (wxToolBarTool *)t; wxToolBarTool *tool = (wxToolBarTool *)t;
if ( tool->m_index < 0 ) if ( tool->m_index < 0 )
return ; return ;
@@ -541,6 +544,9 @@ void wxToolBar::DoEnableTool(wxToolBarToolBase *t, bool enable)
void wxToolBar::DoToggleTool(wxToolBarToolBase *t, bool toggle) void wxToolBar::DoToggleTool(wxToolBarToolBase *t, bool toggle)
{ {
if (!IsShown())
return ;
wxToolBarTool *tool = (wxToolBarTool *)t; wxToolBarTool *tool = (wxToolBarTool *)t;
if ( tool->m_index < 0 ) if ( tool->m_index < 0 )
return ; return ;

View File

@@ -527,6 +527,9 @@ wxString wxToolBar::MacGetToolTipString( wxPoint &pt )
void wxToolBar::DoEnableTool(wxToolBarToolBase *t, bool enable) void wxToolBar::DoEnableTool(wxToolBarToolBase *t, bool enable)
{ {
if (!IsShown())
return ;
wxToolBarTool *tool = (wxToolBarTool *)t; wxToolBarTool *tool = (wxToolBarTool *)t;
if ( tool->m_index < 0 ) if ( tool->m_index < 0 )
return ; return ;
@@ -541,6 +544,9 @@ void wxToolBar::DoEnableTool(wxToolBarToolBase *t, bool enable)
void wxToolBar::DoToggleTool(wxToolBarToolBase *t, bool toggle) void wxToolBar::DoToggleTool(wxToolBarToolBase *t, bool toggle)
{ {
if (!IsShown())
return ;
wxToolBarTool *tool = (wxToolBarTool *)t; wxToolBarTool *tool = (wxToolBarTool *)t;
if ( tool->m_index < 0 ) if ( tool->m_index < 0 )
return ; return ;