Fix regression with wxAuiToolBar gripper and overflow members initialization.
The changes of r72785 moved m_gripperVisible and m_overflowVisible initialization to Init() but this was too early as these fields depend on the window style only set when it's really created, so re-initialize them to their proper values in Create(). Closes #14794. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -804,7 +804,7 @@ void wxAuiToolBar::Init()
|
|||||||
m_buttonWidth = -1;
|
m_buttonWidth = -1;
|
||||||
m_buttonHeight = -1;
|
m_buttonHeight = -1;
|
||||||
m_sizerElementCount = 0;
|
m_sizerElementCount = 0;
|
||||||
m_actionPos = wxPoint(-1,-1);
|
m_actionPos = wxDefaultPosition;
|
||||||
m_actionItem = NULL;
|
m_actionItem = NULL;
|
||||||
m_tipItem = NULL;
|
m_tipItem = NULL;
|
||||||
m_art = new wxAuiDefaultToolBarArt;
|
m_art = new wxAuiDefaultToolBarArt;
|
||||||
@@ -814,9 +814,10 @@ void wxAuiToolBar::Init()
|
|||||||
m_gripperSizerItem = NULL;
|
m_gripperSizerItem = NULL;
|
||||||
m_overflowSizerItem = NULL;
|
m_overflowSizerItem = NULL;
|
||||||
m_dragging = false;
|
m_dragging = false;
|
||||||
m_gripperVisible = (m_windowStyle & wxAUI_TB_GRIPPER) ? true : false;
|
m_gripperVisible = false;
|
||||||
m_overflowVisible = (m_windowStyle & wxAUI_TB_OVERFLOW) ? true : false;
|
m_overflowVisible = false;
|
||||||
m_overflowState = 0;
|
m_overflowState = 0;
|
||||||
|
m_orientation = wxHORIZONTAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxAuiToolBar::Create(wxWindow* parent,
|
bool wxAuiToolBar::Create(wxWindow* parent,
|
||||||
@@ -831,6 +832,10 @@ bool wxAuiToolBar::Create(wxWindow* parent,
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
m_windowStyle = style;
|
m_windowStyle = style;
|
||||||
|
|
||||||
|
m_gripperVisible = (style & wxAUI_TB_GRIPPER) ? true : false;
|
||||||
|
m_overflowVisible = (style & wxAUI_TB_OVERFLOW) ? true : false;
|
||||||
|
|
||||||
m_orientation = GetOrientation(style);
|
m_orientation = GetOrientation(style);
|
||||||
if (m_orientation == wxBOTH)
|
if (m_orientation == wxBOTH)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user