mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-24 13:25:16 +02:00
Page counts should not be deleted when opening controls
This commit is contained in:
parent
5e67433334
commit
306deb01cb
2 changed files with 5 additions and 1 deletions
|
|
@ -202,7 +202,10 @@ def render_head_foot(div, which, region, metadata, current_toc_node, current_toc
|
|||
else:
|
||||
text = format_pos(pos.file_progress_frac, pos.chapter_length)
|
||||
elif field is 'pages-progress':
|
||||
text = f'{pos.page_counts.current + 1} / {pos.page_counts.total}'
|
||||
if pos.page_counts:
|
||||
text = f'{pos.page_counts.current + 1} / {pos.page_counts.total}'
|
||||
else:
|
||||
text = _('Unknown')
|
||||
if not text:
|
||||
text = '\xa0'
|
||||
if text is not div.textContent:
|
||||
|
|
|
|||
|
|
@ -1143,6 +1143,7 @@ def on_report_cfi(self, data):
|
|||
'file_progress_frac': data.file_progress_frac,
|
||||
'selected_text': data.selected_text,
|
||||
'selection_bounds': data.selection_bounds,
|
||||
'page_counts': data.page_counts
|
||||
})
|
||||
v'delete self.report_cfi_callbacks[data.request_id]'
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue