]> git.street.me.uk Git - andy/viking.git/commit - src/uibuilder.h
Enable fast and GUI controllable alphabetical sorting of treeview layers.
authorRob Norris <rw_norris@hotmail.com>
Thu, 13 Jun 2013 19:00:12 +0000 (20:00 +0100)
committerRob Norris <rw_norris@hotmail.com>
Thu, 13 Jun 2013 19:01:22 +0000 (20:01 +0100)
commit0a150ac46da2b7465423351801e44c4a8d8afc02
tree3d264ee28285dd1a9e68fa9204023e7bee981ef6
parent4cfba6c7a364755192c63d8a32ec18da4e6dbb0a
Enable fast and GUI controllable alphabetical sorting of treeview layers.

Use the gtk_tree_store_reorder method as it very quick.

This ordering can be performed on demand and works for any parent iterator (i.e. both sublayer and layer levels)

It should be called whenever an individual sublayer item is added or renamed (or after a group of sublayer items have been added).

Previously with insertion sort on every sublayer addition: adding 10,000 items would take over 30 seconds!
Now sorting after simply adding all tracks takes 1 second.
For a KML file with over 10,000 tracks (3Mb zipped) - See 'UK Hampshire Rights of Way'
 http://www3.hants.gov.uk/row/row-maps.htm
src/uibuilder.h
src/viktreeview.c
src/viktreeview.h