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)

This commit is contained in:
Kovid Goyal 2015-03-05 08:55:46 +05:30
parent 9e7d4d0ed9
commit 899e66319a

View File

@ -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()))