mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
apply_highlight() should not leave stale keys in annot_id_uuid_map
This commit is contained in:
parent
1e33d28d3e
commit
fa0073ea45
@ -832,8 +832,9 @@ class IframeBoss:
|
|||||||
removed_highlights = {}
|
removed_highlights = {}
|
||||||
for crw in intersecting_wrappers:
|
for crw in intersecting_wrappers:
|
||||||
unwrap_crw(crw)
|
unwrap_crw(crw)
|
||||||
if annot_id_uuid_map[crw] and annot_id_uuid_map[crw] is not uuid:
|
if annot_id_uuid_map[crw]:
|
||||||
removed_highlights[annot_id_uuid_map[crw]] = True
|
if annot_id_uuid_map[crw] is not uuid:
|
||||||
|
removed_highlights[annot_id_uuid_map[crw]] = True
|
||||||
v'delete annot_id_uuid_map[crw]'
|
v'delete annot_id_uuid_map[crw]'
|
||||||
removed_highlights = Object.keys(removed_highlights)
|
removed_highlights = Object.keys(removed_highlights)
|
||||||
sel.removeAllRanges()
|
sel.removeAllRanges()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user