mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-04 14:45:07 +01:00
When applying a new highlight over a single existing one, replace it
This commit is contained in:
parent
e492c88c9a
commit
d61273b7cd
1 changed files with 5 additions and 1 deletions
|
|
@ -664,12 +664,16 @@ def annotations_msg_received(self, data):
|
|||
unwrap_crw(crw)
|
||||
removed_highlights[self.annot_id_uuid_map[crw]] = True
|
||||
v'delete self.annot_id_uuid_map[crw]'
|
||||
removed_highlights = Object.keys(removed_highlights)
|
||||
if removed_highlights.length is 1:
|
||||
data.uuid = removed_highlights[0]
|
||||
removed_highlights = v'[]'
|
||||
self.send_message(
|
||||
'annotations',
|
||||
type='highlight-applied',
|
||||
uuid=data.uuid, ok=annot_id is not None,
|
||||
bounds=bounds,
|
||||
removed_highlights=Object.keys(removed_highlights),
|
||||
removed_highlights=removed_highlights,
|
||||
highlighted_text=text,
|
||||
)
|
||||
reset_find_caches()
|
||||
|
|
|
|||
Loading…
Reference in a new issue