From 74c80fe40be90a5a604b9de8731fcedf910e7d7d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 21 Sep 2008 13:05:56 +0000 Subject: [PATCH] don't waste time sending out update UI events for separators, they can't be updated anyhow git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55765 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/tbarbase.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/common/tbarbase.cpp b/src/common/tbarbase.cpp index 0e6d905ab3..8d07da7930 100644 --- a/src/common/tbarbase.cpp +++ b/src/common/tbarbase.cpp @@ -697,7 +697,11 @@ void wxToolBarBase::UpdateWindowUI(long flags) node; node = node->GetNext() ) { - int id = node->GetData()->GetId(); + wxToolBarToolBase * const tool = node->GetData(); + if ( tool->IsSeparator() ) + continue; + + int id = tool->GetId(); wxUpdateUIEvent event(id); event.SetEventObject(this); -- 2.45.2