Skip to content
Snippets Groups Projects
Commit da8bb323 authored by Samuel Degueldre's avatar Samuel Degueldre
Browse files

[FIX] web_editor: fix shape transparency color preview handling


Previously, the transparency color for shapes was not taken into account
when handling the preview state transitions of the background shape
snippet option. This caused strange behaviours where the shape
transparency color would always get reset when it was a class color,
either when changing to a different shape (expected, all shape colors
should get reset) or when changing any other shape setting like other
shape colors or flipping the shape (not expected). On the other hand, if
the transparency color was not a class color, it would always remain
untouched, when changing other shapes settings (expected) but also when
changing shape type (eg Origins 01 -> Blocks 02, unwanted).

This commit fixes that by cloning the entire shape container during
preview, and restoring it on preview-reset.

task-2380815

closes odoo/odoo#61710

Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
parent 333a9124
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment