bool wxToolBarToolBase::Enable(bool enable)
{
+ if ( m_enabled == enable )
+ return false;
+
m_enabled = enable;
return true;
{
wxASSERT_MSG( CanBeToggled(), _T("can't toggle this tool") );
+ if ( m_toggled == toggle )
+ return false;
+
m_toggled = toggle;
return true;
bool wxToolBarToolBase::SetToggle(bool toggle)
{
wxItemKind kind = toggle ? wxITEM_CHECK : wxITEM_NORMAL;
+ if ( m_kind == kind )
+ return false;
m_kind = kind;
bool wxToolBarToolBase::SetShortHelp(const wxString& help)
{
+ if ( m_shortHelpString == help )
+ return false;
+
m_shortHelpString = help;
return true;
bool wxToolBarToolBase::SetLongHelp(const wxString& help)
{
+ if ( m_longHelpString == help )
+ return false;
+
m_longHelpString = help;
return true;
{
wxWindowBase::UpdateWindowUI(flags);
+ // There is no sense in updating the toolbar UI
+ // if the parent window is about to get destroyed
+ wxWindow *tlw = wxGetTopLevelParent( this );
+ if (tlw && wxPendingDelete.Member( tlw ))
+ return;
+
wxEvtHandler* evtHandler = GetEventHandler() ;
for ( wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst();