Opened 6 years ago

Closed 6 years ago

#14794 closed defect (fixed)

wxAuiToolBar regression in recent added Create() method

Reported by: RedTide Owned by:
Priority: normal Milestone:
Component: wxAui Version: stable-latest
Keywords: overflow items Create() Cc:
Blocked By: Blocking:
Patch: yes


m_gripperVisible and m_overflowVisible are set in Init(), too early to retrieve m_windowStyle value set later in Create().
The problem can be seen also in auidemo sample: all toolbars are shown without any overflow items dropdown button.
This patch correct the issue, adding some other member variables initialization.

Attachments (1)

auibar_create.diff download (2.8 KB) - added by RedTide 6 years ago.

Download all attachments as: .zip

Change History (4)

Changed 6 years ago by RedTide

comment:1 Changed 6 years ago by vadz

Sorry, I don't see why do we need the duplicate initialization for. We could move the initialization of the padding fields into Init() but, frankly, why bother.

I'll apply the main part of the patch, of course, thanks for fixing this!

comment:2 Changed 6 years ago by VZ

(In [72913]) Use wxAUI_TB_DEFAULT_STYLE instead of 0 as default style value.

No real changes.

See #14794.

comment:3 Changed 6 years ago by VZ

  • Resolution set to fixed
  • Status changed from new to closed

(In [72914]) 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.

Note: See TracTickets for help on using tickets.