git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25130
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
bool wxToolBarToolBase::Enable(bool enable)
{
bool wxToolBarToolBase::Enable(bool enable)
{
+ if ( m_enabled == enable )
+ return false;
+
m_enabled = enable;
return true;
m_enabled = enable;
return true;
{
wxASSERT_MSG( CanBeToggled(), _T("can't toggle this tool") );
{
wxASSERT_MSG( CanBeToggled(), _T("can't toggle this tool") );
+ if ( m_toggled == toggle )
+ return false;
+
m_toggled = toggle;
return true;
m_toggled = toggle;
return true;
bool wxToolBarToolBase::SetToggle(bool toggle)
{
wxItemKind kind = toggle ? wxITEM_CHECK : wxITEM_NORMAL;
bool wxToolBarToolBase::SetToggle(bool toggle)
{
wxItemKind kind = toggle ? wxITEM_CHECK : wxITEM_NORMAL;
+ if ( m_kind == kind )
+ return false;
bool wxToolBarToolBase::SetShortHelp(const wxString& help)
{
bool wxToolBarToolBase::SetShortHelp(const wxString& help)
{
+ if ( m_shortHelpString == help )
+ return false;
+
m_shortHelpString = help;
return true;
m_shortHelpString = help;
return true;
bool wxToolBarToolBase::SetLongHelp(const wxString& help)
{
bool wxToolBarToolBase::SetLongHelp(const wxString& help)
{
+ if ( m_longHelpString == help )
+ return false;
+
m_longHelpString = help;
return true;
m_longHelpString = help;
return true;