#15183 closed defect (fixed)

wxRichTextTable::DeleteColumns doesn't remove the deleted columns

Reported by: dghart Owned by:
Priority: normal Milestone: 2.9.5
Component: wxRichText Version: stable-latest
Keywords: wxRichTextTable::DeleteColumns Cc:
Blocked By: Blocking:
Patch: yes

Description

The wxRichTextTable::DeleteColumns implementation has two bugs, the second of which it shares with DeleteRows():

1) It deletes the relevant cell object from each row, but doesn't remove it from the array. This results in a segfault when the table is next laid out.

2) The initial range check is too strict, preventing deletion of the last column or row.

The patch fixes both. A unit-test, that will allow before/after testing, will be attached to a later report in this series, which will probably be #15185.

Attachments (1)

wxrichtextbuffer.diff download (1.5 KB) - added by dghart 16 months ago.

Download all attachments as: .zip

Change History (3)

Changed 16 months ago by dghart

comment:1 Changed 16 months ago by vadz

Julian, could you please check if it's OK to apply?

comment:2 Changed 16 months ago by juliansmart

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

Applied, many thanks.

Note: See TracTickets for help on using tickets.