#15367 closed defect (fixed)

wxPropertyGrid::GetPropertyRect fails, when the last item is collapsed

Reported by: obfuscated Owned by:
Priority: normal Milestone:
Component: wxPropertyGrid Version: stable-latest
Keywords: Cc:
Blocked By: Blocking:
Patch: yes

Description

I have this code in my application:

wxPGProperty *first = grid->GetFirstProperty();
wxPGProperty *last = grid->GetLastProperty();
wxRect rect = grid->GetPropertyRect(first, last);

And when the last item is collapsed, the returned rect.height is equal to -1. The reason is that wxPGProperty::GetY2 returns -1 if the item is collapsed.

The attached patch fixes the problem.

Originally reported here: https://sourceforge.net/p/wxpropgrid/bugs/153/

Attachments (1)

0001-Fix-GetPropertyRect-to-return-the-correct-value-when.patch download (989 bytes) - added by obfuscated 13 months ago.

Download all attachments as: .zip

Change History (3)

comment:1 Changed 13 months ago by obfuscated

The patch is made against the git repo on github.

comment:2 Changed 13 months ago by VZ

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

(In [74627]) Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.

Return the real height instead of -1.

Closes #15367.

Note: See TracTickets for help on using tickets.