This commit is contained in:
Kovid Goyal 2014-02-09 15:24:03 +05:30
parent 0852b99192
commit cfcc8c8a87

View File

@ -247,7 +247,8 @@ class TOC(QStandardItemModel):
backwards=False, current_entry=None): backwards=False, current_entry=None):
current_entry = (self.currently_viewed_entry if current_entry is None current_entry = (self.currently_viewed_entry if current_entry is None
else current_entry) else current_entry)
if current_entry is None: return if current_entry is None:
return
items = reversed(self.all_items) if backwards else self.all_items items = reversed(self.all_items) if backwards else self.all_items
found = False found = False