From 70db76374450913cb75804b884baf6cd7a5a345c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 25 Jun 2014 06:25:40 +0530 Subject: [PATCH] Fix #1333932 [Edit Book: Double-click on a file category raises a error](https://bugs.launchpad.net/calibre/+bug/1333932) --- src/calibre/gui2/tweak_book/file_list.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/tweak_book/file_list.py b/src/calibre/gui2/tweak_book/file_list.py index 0809d41162..c27af04da1 100644 --- a/src/calibre/gui2/tweak_book/file_list.py +++ b/src/calibre/gui2/tweak_book/file_list.py @@ -574,7 +574,9 @@ class FileList(QTreeWidget): self.reorder_spine.emit(order) def item_double_clicked(self, item, column): - self._request_edit(item) + category = unicode(item.data(0, CATEGORY_ROLE).toString()) + if category: + self._request_edit(item) def _request_edit(self, item): category = unicode(item.data(0, CATEGORY_ROLE).toString())