From 9bdf647f7d301d63e44c52f31d52385beadd2ee9 Mon Sep 17 00:00:00 2001 From: Dalmais Date: Tue, 28 Nov 2023 20:46:50 +0100 Subject: [PATCH] Use nodeId style instead the StyleCollection style If we want to customize a nodeId style then we should return the data of the nodeId instead of the generic StyleCollection style. By default the nodeId style use the generic StyleCollection so there is no change for user that don't tweak the style. --- src/DataFlowGraphModel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DataFlowGraphModel.cpp b/src/DataFlowGraphModel.cpp index a5ba8734f..ad71e3b11 100644 --- a/src/DataFlowGraphModel.cpp +++ b/src/DataFlowGraphModel.cpp @@ -211,7 +211,7 @@ QVariant DataFlowGraphModel::nodeData(NodeId nodeId, NodeRole role) const break; case NodeRole::Style: { - auto style = StyleCollection::nodeStyle(); + auto style = _models.at(nodeId)->nodeStyle(); result = style.toJson().toVariantMap(); } break;