fix(ui): edge case where transforms don't do anything due to caching

This could be triggered by transforming a layer, undoing, then transforming again. The simple fix is to ignore the rasterization cache for all transforms.
This commit is contained in:
psychedelicious
2024-10-09 20:25:04 +10:00
parent d56c80af8e
commit ed54b89e9e

View File

@@ -644,7 +644,12 @@ export class CanvasEntityTransformer extends CanvasModuleBase {
this.$isProcessing.set(true);
const rect = this.getRelativeRect();
const rasterizeResult = await withResultAsync(() =>
this.parent.renderer.rasterize({ rect, replaceObjects: true, attrs: { opacity: 1, filters: [] } })
this.parent.renderer.rasterize({
rect,
replaceObjects: true,
ignoreCache: true,
attrs: { opacity: 1, filters: [] },
})
);
if (rasterizeResult.isErr()) {
this.log.error({ error: serializeError(rasterizeResult.error) }, 'Failed to rasterize entity');