#15153 closed defect (fixed)

wxRichTextTable::AddColumns and ::AddRows don't properly create their cells

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

Description

When wxRichTextTable::CreateTable creates its cells, it gives each an empty paragraph. wxRichTextTable::AddColumns and wxRichTextTable::AddRows don't. This causes problems, as can be seen in the attached diffs to the richtext sample:

richtext1.diff uses CreateTable() followed by table->AddColumns(). The space for the new cells can be seen, but the cells have no border and can't be entered.
richtext1.diff adds a column to the table already present in the sample. For some reason this segfaults in the next line, r.SetFocusObject(NULL).

Both diffs work correctly after uncommenting the section that gives each cell an empty paragraph. The patch does the same thing inside AddColumns() and AddRows().

Attachments (3)

richtext1.diff download (14.1 KB) - added by dghart 12 months ago.
richtext2.diff download (1.3 KB) - added by dghart 12 months ago.
richtextbuffer.diff download (776 bytes) - added by dghart 12 months ago.

Download all attachments as: .zip

Change History (4)

Changed 12 months ago by dghart

Changed 12 months ago by dghart

Changed 12 months ago by dghart

comment:1 Changed 12 months ago by VZ

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

(In [73878]) Add empty paragraph in wxRichTextTable::AddColumns() and AddRows().

Do the same thing in Add{Columns,Rows}() as in CreateTable() to ensure the
proper cell creation.

Closes #15153,

Note: See TracTickets for help on using tickets.