From fd990f51e10e12ae98a3585c57fd424094f85b89 Mon Sep 17 00:00:00 2001 From: Charles Haley Date: Wed, 11 Jun 2014 08:44:51 +0200 Subject: [PATCH] Do not sort is_name custom columns when displaying their value in the metadata editor (single). --- src/calibre/gui2/custom_column_widgets.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/custom_column_widgets.py b/src/calibre/gui2/custom_column_widgets.py index 5d52379896..88fd6a1b13 100644 --- a/src/calibre/gui2/custom_column_widgets.py +++ b/src/calibre/gui2/custom_column_widgets.py @@ -327,7 +327,8 @@ class Text(Base): self.widgets[1].update_items_cache(values) val = self.db.get_custom(book_id, num=self.col_id, index_is_id=True) if isinstance(val, list): - val.sort(key=sort_key) + if not self.col_metadata.get('display', {}).get('is_names', False): + val.sort(key=sort_key) self.initial_val = val val = self.normalize_db_val(val)