Dictionary: fix invalid highlight when switching dictionary (#14028)
Some checks failed
macos / macOS 13 x86-64 🔨15.2 🎯10.15 (push) Has been cancelled
macos / macOS 14 ARM64 🔨15.4 🎯11.0 (push) Has been cancelled

When the contents of the HtmlBoxWidget changed the page boxes were not invalidated, this resulted the highlight to show up at a wrong coordinate.

Fixes #14013
This commit is contained in:
TnS-hun
2025-07-06 23:39:51 +02:00
committed by GitHub
parent 095b0d7421
commit 5d3c71724f

View File

@@ -264,6 +264,8 @@ function HtmlBoxWidget:setContent(body, css, default_font_size, is_xhtml, no_css
self.document:layoutDocument(self.dimen.w, self.dimen.h, default_font_size)
self.page_count = self.document:getPages()
self.page_boxes = nil
self:clearHighlight()
end
function HtmlBoxWidget:_render()