#15406 closed defect (fixed)

wxDataViewModel::Compare returns inconsistent results

Reported by: hartwigw Owned by:
Priority: normal Milestone:
Component: GUI-all Version: stable-latest
Keywords: wxDataViewModel comparison Cc:
Blocked By: Blocking:
Patch: yes

Description

If the value type of the data view items is either a string or a long the compare function returns for item1 > item2 a value larger than zero,
if the value type of the data view items is either a double or a date the compare function returns for item1 < item2 a value larger than zero.

I believe that the functionality for strings and longs is correct. Therefore, I have submitted a patch for the other cases.

Attachments (1)

wxDataView_21.patch download (719 bytes) - added by hartwigw 15 months ago.

Download all attachments as: .zip

Change History (2)

Changed 15 months ago by hartwigw

comment:1 Changed 13 months ago by VZ

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

(In [74949]) Correct sorting order for doubles and wxDateTime in wxDataViewModel.

They were compared inconsistently with the numbers and strings, -1 is supposed
to be returned if the first element is less than the second one, not 1.

Closes #15406.

Note: See TracTickets for help on using tickets.