From 899e66319aea5a32b1156a45f2b709426d912e3f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 5 Mar 2015 08:55:46 +0530 Subject: [PATCH] Table of Contents Editor: Fix selecting a location inside a file and then clicking on another file causes the previous location to be used in the new file. Fixes #1428212 [Edit Book: ToC editor creates wrong entries](https://bugs.launchpad.net/calibre/+bug/1428212) --- src/calibre/gui2/toc/location.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/calibre/gui2/toc/location.py b/src/calibre/gui2/toc/location.py index dce305fa84..7623218bbd 100644 --- a/src/calibre/gui2/toc/location.py +++ b/src/calibre/gui2/toc/location.py @@ -218,6 +218,7 @@ class ItemEdit(QWidget): def current_changed(self, item): name = self.current_name = unicode(item.data(Qt.DisplayRole) or '') + self.current_frag = None path = self.container.name_to_abspath(name) # Ensure encoding map is populated root = self.container.parsed(name) @@ -305,5 +306,3 @@ class ItemEdit(QWidget): def result(self): return (self.current_item, self.current_where, self.current_name, self.current_frag, unicode(self.name.text())) - -