From c760e7e1de6ce63dbe7622d031ffe507b76396d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Micha=C3=ABl=20Celerier?= Date: Sat, 9 Nov 2024 22:10:30 -0500 Subject: [PATCH] [ui] Resize node when ports change --- .../score-lib-process/Process/Dataflow/NodeItem.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/plugins/score-lib-process/Process/Dataflow/NodeItem.cpp b/src/plugins/score-lib-process/Process/Dataflow/NodeItem.cpp index 2dbbfce207..8340432d84 100644 --- a/src/plugins/score-lib-process/Process/Dataflow/NodeItem.cpp +++ b/src/plugins/score-lib-process/Process/Dataflow/NodeItem.cpp @@ -86,6 +86,14 @@ NodeItem::NodeItem( if(p != pos()) setPos(p); }); + + auto on_sizeChanged = [this] { + updateSize(); + updateZoomRatio(); + updateTitlePos(); + }; + connect(&process, &Process::ProcessModel::inletsChanged, this, on_sizeChanged); + connect(&process, &Process::ProcessModel::outletsChanged, this, on_sizeChanged); } void NodeItem::createWithDecorations()