Skip to content

Commit

Permalink
fix: removing event handler type action deletes flow connection lines
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Sep 28, 2024
1 parent 65311c5 commit e2f9a11
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions packages/project-editor/flow/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2553,15 +2553,17 @@ export class EventHandler extends EezObject {
},

deleteObjectRefHook: (eventHandler: EventHandler) => {
const widget = getAncestorOfType<Widget>(
eventHandler,
ProjectEditor.WidgetClass.classInfo
)!;

ProjectEditor.getFlow(widget).deleteConnectionLinesFromOutput(
widget,
eventHandler.eventName
);
if (eventHandler.handlerType == "flow") {
const widget = getAncestorOfType<Widget>(
eventHandler,
ProjectEditor.WidgetClass.classInfo
)!;

ProjectEditor.getFlow(widget).deleteConnectionLinesFromOutput(
widget,
eventHandler.eventName
);
}
},

defaultValue: {
Expand Down

0 comments on commit e2f9a11

Please sign in to comment.