Project

General

Profile

Actions

Bug #2717

closed

Incorrect sort after edit in Widget Gallery Category Chart example

Added by Anonymous about 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Low
Assignee:
Target version:
Start date:
02/25/2014
Due date:
% Done:

0%

Estimated time:

Description

The category chart example in the widget gallery can produce incorrect sort orderings on a column if one or more fields in the column are edited. I don't believe the issue is browser dependent, but I tested with chromium 32.0.1700.123 Debian 7.4 (248368) and the latest github version of Wt 3.3.2-rc1-24-gb6a1a4e. The issue can (currently) also be observed at: http://www.webtoolkit.eu/widgets/graphics-charts/category-chart. To reproduce the issue, browse to the above page and:

  1. Click on the last entry of the second column ("Rural Male"). It should have the value "12".
  2. Change the value to "2" and press enter.
  3. Sort the column by clicking on the column header ("Rural Male").
  4. The Rural Male column should now be in ascending order with the value "2" in row 1. Instead, the value "2" will be in row 5.
  5. If you repeatedly click on the "Rural Male" column header, the value "2" will sequence through rows 1, 4, 4, and back to 5,

I've attached a patch which seems to address the issue (see comments on patch). The patch has only been lightly tested and includes a modification to discard edits if escape is pressed or the mouse is clicked outside the edited field (blur). If you can suggest a better approach, I'd be happy to submit a revised patch.


Files

Actions #1

Updated by Bruce Toll about 10 years ago

Hey Koen,

I forgot to log-in, but I submitted the (minor) issue above.

Regards,

Bruce

Actions #2

Updated by Koen Deforche about 10 years ago

  • Status changed from New to Resolved
  • Assignee set to Koen Deforche
  • Target version set to 3.3.2

Hey Bruce,

I've resolved this in the model by using WStandardItemModel::setItemPrototype() and overriding setData().

Regards,

koen

Actions #3

Updated by Bruce Toll about 10 years ago

Hey Koen,

Thanks for the explanation. I'm looking forward to the new release.

Regards,

Bruce

Actions #4

Updated by Koen Deforche about 10 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF