From e83b6ec94b991734f127a0571b73cf5389c48b39 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Thu, 12 Dec 2024 13:44:02 +0100 Subject: [PATCH] Ensure Draw, Pick or Transform action when changing redlining layer --- plugins/Redlining.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/Redlining.jsx b/plugins/Redlining.jsx index b9f0b7ac2..e284e802d 100644 --- a/plugins/Redlining.jsx +++ b/plugins/Redlining.jsx @@ -392,7 +392,8 @@ class Redlining extends React.Component { this.updateRedliningState(data); }; changeRedliningLayer = (layer) => { - this.updateRedliningState({layer: layer.id, layerTitle: layer.title}); + const action = ["Draw", "Pick", "Transform"].includes(this.props.redlining.action) ? this.props.redlining.action : "Pick"; + this.updateRedliningState({layer: layer.id, layerTitle: layer.title, action: action}); }; }