davesrocketshop / Rocket

FreeCAD Rocketry Workbench
GNU Lesser General Public License v2.1
49 stars 10 forks source link

When I sort one of the numerical columns in the Component Lookup, it sorts the column as text instead of numbers: 100, 102, 103, 11, 12, 13 etc. #21

Open davesrocketshop opened 3 years ago

davesrocketshop commented 3 years ago

When I sort one of the numerical columns in the Component Lookup, it sorts the column as text instead of numbers: 100, 102, 103, 11, 12, 13 etc. image

Running Rocket Worshop 2.11 on FreeCAD 0.19 rev 24276

Originally posted by @GaryCAP in https://github.com/davesrocketshop/Rocket/issues/15#issuecomment-809544936

davesrocketshop commented 3 years ago

This will require a custom sort filter as the numeric fields also include units. The units will also have to be normalized.

davesrocketshop commented 2 years ago

Merged

davesrocketshop commented 2 years ago

The current solution using QSortFilterProxyModel is unacceptably slow. This needs a rethink