From 9ed4d3c61319807975950be988174a04edfe5c29 Mon Sep 17 00:00:00 2001 From: Philipp Schaad Date: Tue, 4 Oct 2022 15:04:18 +0200 Subject: [PATCH] Fix transformation properties not being set Closes #199. --- src/webclients/components/sdfv/utils/attributes_table.ts | 2 +- src/webclients/components/transformations/transformations.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/webclients/components/sdfv/utils/attributes_table.ts b/src/webclients/components/sdfv/utils/attributes_table.ts index 33f4e1d..2b4c402 100644 --- a/src/webclients/components/sdfv/utils/attributes_table.ts +++ b/src/webclients/components/sdfv/utils/attributes_table.ts @@ -878,7 +878,7 @@ export async function attributeTablePutEntry( const valPropUpdateHandler = valueChangeHandlerOverride !== undefined ? valueChangeHandlerOverride : (prop: Property) => { const sdfg = VSCodeRenderer.getInstance()?.get_sdfg(); - if (!xform && prop.update() && sdfg) + if (prop && prop.update() && !xform && sdfg) vscodeWriteGraph(sdfg); }; diff --git a/src/webclients/components/transformations/transformations.ts b/src/webclients/components/transformations/transformations.ts index ade89e8..b5c6eb7 100644 --- a/src/webclients/components/transformations/transformations.ts +++ b/src/webclients/components/transformations/transformations.ts @@ -143,11 +143,13 @@ export class Transformation extends TransformationListItem { 'class': 'transformation-list-quick-apply', 'text': 'Quick Apply', 'title': 'Apply transformation with default parameters', - 'click': () => { + 'click': (event: Event) => { + event.stopPropagation(); vscode.postMessage({ type: 'sdfv.apply_transformations', transformations: [this.json], }); + return true; }, }).appendTo(labelContainer);