openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #29284
Re: [Merge] lp:~minkus/openlp/naturalsortfix into lp:openlp
Added an example
Diff comments:
> === modified file 'openlp/plugins/songs/forms/editsongform.py'
> --- openlp/plugins/songs/forms/editsongform.py 2016-01-30 20:41:22 +0000
> +++ openlp/plugins/songs/forms/editsongform.py 2016-04-17 21:48:18 +0000
> @@ -110,7 +111,8 @@
> """
> Generically load a set of objects into a cache and a combobox.
> """
> - objects = self.manager.get_all_objects(cls, order_by_ref=cls.name)
> + objects = self.manager.get_all_objects(cls)
> + objects.sort(key=lambda object: get_natural_key(object.name))
e.g.
get_key = lambda object: get_natural_key(object.name)
objects.sort(key=get_key)
> combo.clear()
> combo.addItem('')
> for obj in objects:
--
https://code.launchpad.net/~minkus/openlp/naturalsortfix/+merge/292101
Your team OpenLP Core is subscribed to branch lp:openlp.
References