Opened 11 years ago

Closed 11 years ago

#13004 closed defect (fixed)

wxGBSizerItem default constructor assertion

Reported by: Trigve Owned by:
Priority: high Milestone:
Component: GUI-all Version: stable-latest
Keywords: wxGBSpan assert wxGBSizerItem Cc:
Blocked By: Blocking:
Patch: yes


wxGBSizerItem default constructor initialize m_span member like m_span(-1, -1) which cause assertion in wxGBSpan::SetRowspan() because span value must be != -1. I think this is bug because when I create wxGBSizerItem () with default constructor it should call wxGBSpan default constructor. Because of this bug, loading grid bag sizer from xrc isn't possible because in wxSizerXmlHandler::MakeSizerItem(), wxGBSizerItem instance is created and therefore assert pops-up. Attach patch solves it, but I don't know if it doesn't break some others invariants

Attachments (1)

gb_sizer.patch download (333 bytes) - added by Trigve 11 years ago.

Download all attachments as: .zip

Change History (2)

Changed 11 years ago by Trigve

comment:1 Changed 11 years ago by VZ

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

(In [67127]) Don't initialize wxGBSpan with invalid values in wxGBSizerItem.

Default wxGBSizerItem ctor initialized wxGBSpan with invalid values which
resulted in an assert when loading wxGBSizer from XRC since r66964.

Fix this by simply using the default wxGBSpan ctor instead.

Closes #13004.

Note: See TracTickets for help on using tickets.