ImageWidget: account for alpha in the cache hash

This commit is contained in:
poire-z
2023-02-16 23:30:52 +01:00
parent 8d3cda532b
commit e4b97802a5

View File

@@ -143,7 +143,7 @@ function ImageWidget:_loadfile()
width = self.width
height = self.height
end
local hash = "image|"..self.file.."|"..(width or "").."|"..(height or "")
local hash = "image|"..self.file.."|"..(width or "").."|"..(height or "")..tostring(self.alpha)
-- Do the scaling for DPI here, so it can be cached and not re-done
-- each time in _render() (but not if scale_factor, to avoid double scaling)
local scale_for_dpi_here = false