Ticket #14794 (closed defect: fixed)

Opened 7 months ago

Last modified 7 months ago

wxAuiToolBar regression in recent added Create() method

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

Description

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

auibar_create.diff download (2.8 KB) - added by RedTide 7 months ago.

Change History

Changed 7 months ago by RedTide

Changed 7 months 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!

Changed 7 months ago by VZ

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

No real changes.

See #14794.

Changed 7 months ago by VZ

  • status changed from new to closed
  • resolution set to fixed

(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.