From 86b1181233d029852e197ef21d2284a89a16ca05 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 13 Feb 2016 12:22:04 +0100 Subject: [PATCH] Fix issue with AUI toolbar overflow button always showing up When resizing a wxAuiToolbar, the overflow button always showed up, and the SetOverflowVisible() doesn't work as expected. E.g. tb->SetOverflowVisible(!tb->GetToolFitsByIndex(tb->GetToolCount()-1)); tb->Refresh() This was caused by the logic in OnPaint() ignoring the m_overflowVisible flag and always drawing (or not drawing) the overflow button. Add a check for it to fix this. Closes https://github.com/wxWidgets/wxWidgets/pull/212 --- src/aui/auibar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aui/auibar.cpp b/src/aui/auibar.cpp index a602cdb0f7..4919a99dbe 100644 --- a/src/aui/auibar.cpp +++ b/src/aui/auibar.cpp @@ -2466,7 +2466,7 @@ void wxAuiToolBar::OnPaint(wxPaintEvent& WXUNUSED(evt)) } // paint the overflow button - if (dropdown_size > 0 && m_overflowSizerItem) + if (dropdown_size > 0 && m_overflowSizerItem && m_overflowVisible) { wxRect dropDownRect = GetOverflowRect(); m_art->DrawOverflowButton(dc, this, dropDownRect, m_overflowState);