Opened 5 years ago

Closed 5 years ago

#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


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:

Attachments (1)

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

Download all attachments as: .zip

Change History (3)

comment:1 Changed 5 years ago by obfuscated

The patch is made against the git repo on github.

comment:2 Changed 5 years 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.