From: Julian Smart Date: Sun, 11 Jan 2004 17:38:11 +0000 (+0000) Subject: Reverted bad fix. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ae29146343c4c84d80ff907c352e94740d076a3d Reverted bad fix. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25130 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/tbarbase.cpp b/src/common/tbarbase.cpp index 36d6474ab4..f2310dc1a9 100644 --- a/src/common/tbarbase.cpp +++ b/src/common/tbarbase.cpp @@ -63,6 +63,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxToolBarToolBase, wxObject) bool wxToolBarToolBase::Enable(bool enable) { + if ( m_enabled == enable ) + return false; + m_enabled = enable; return true; @@ -72,6 +75,9 @@ bool wxToolBarToolBase::Toggle(bool toggle) { wxASSERT_MSG( CanBeToggled(), _T("can't toggle this tool") ); + if ( m_toggled == toggle ) + return false; + m_toggled = toggle; return true; @@ -80,6 +86,8 @@ bool wxToolBarToolBase::Toggle(bool toggle) bool wxToolBarToolBase::SetToggle(bool toggle) { wxItemKind kind = toggle ? wxITEM_CHECK : wxITEM_NORMAL; + if ( m_kind == kind ) + return false; m_kind = kind; @@ -88,6 +96,9 @@ bool wxToolBarToolBase::SetToggle(bool toggle) bool wxToolBarToolBase::SetShortHelp(const wxString& help) { + if ( m_shortHelpString == help ) + return false; + m_shortHelpString = help; return true; @@ -95,6 +106,9 @@ bool wxToolBarToolBase::SetShortHelp(const wxString& help) bool wxToolBarToolBase::SetLongHelp(const wxString& help) { + if ( m_longHelpString == help ) + return false; + m_longHelpString = help; return true;