mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Page counts should not be deleted when opening controls
This commit is contained in:
parent
5e67433334
commit
306deb01cb
@ -202,7 +202,10 @@ def render_head_foot(div, which, region, metadata, current_toc_node, current_toc
|
|||||||
else:
|
else:
|
||||||
text = format_pos(pos.file_progress_frac, pos.chapter_length)
|
text = format_pos(pos.file_progress_frac, pos.chapter_length)
|
||||||
elif field is 'pages-progress':
|
elif field is 'pages-progress':
|
||||||
|
if pos.page_counts:
|
||||||
text = f'{pos.page_counts.current + 1} / {pos.page_counts.total}'
|
text = f'{pos.page_counts.current + 1} / {pos.page_counts.total}'
|
||||||
|
else:
|
||||||
|
text = _('Unknown')
|
||||||
if not text:
|
if not text:
|
||||||
text = '\xa0'
|
text = '\xa0'
|
||||||
if text is not div.textContent:
|
if text is not div.textContent:
|
||||||
|
@ -1143,6 +1143,7 @@ class View:
|
|||||||
'file_progress_frac': data.file_progress_frac,
|
'file_progress_frac': data.file_progress_frac,
|
||||||
'selected_text': data.selected_text,
|
'selected_text': data.selected_text,
|
||||||
'selection_bounds': data.selection_bounds,
|
'selection_bounds': data.selection_bounds,
|
||||||
|
'page_counts': data.page_counts
|
||||||
})
|
})
|
||||||
v'delete self.report_cfi_callbacks[data.request_id]'
|
v'delete self.report_cfi_callbacks[data.request_id]'
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user