small fix

This commit is contained in:
vcoppe
2026-10-04 16:21:48 +02:00
parent 7651d859c4
commit 78e9d45072
2 changed files with 9 additions and 3 deletions
@@ -49,9 +49,12 @@
<Button <Button
variant="outline" variant="outline"
onclick={() => { onclick={() => {
// closes the dialog now: `open` follows `editMetadata`, and the change of the file
// would open the dialog again before the effect below has reset it
editMetadata.current = false;
open = false;
// the metadata of the selected elements are changed // the metadata of the selected elements are changed
engine.metadata(name, description); engine.metadata(name, description);
open = false;
}} }}
> >
<Save size="16" /> <Save size="16" />
@@ -70,6 +70,11 @@
}); });
function applyStyle() { function applyStyle() {
// closes the dialog now: `open` follows `editStyle`, and the style changes the file, which
// would open the dialog again before the effect below has reset it
editStyle.current = false;
open = false;
engine.style({ engine.style({
color: colorChanged ? color : undefined, color: colorChanged ? color : undefined,
opacity: opacityChanged ? opacity : undefined, opacity: opacityChanged ? opacity : undefined,
@@ -84,8 +89,6 @@
$defaultWidth = width; $defaultWidth = width;
} }
} }
open = false;
} }
</script> </script>