mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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:
parent
9e7d4d0ed9
commit
899e66319a
@ -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()))
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user