paceholder / nodeeditor

Qt Node Editor. Dataflow programming framework
BSD 3-Clause "New" or "Revised" License
2.92k stars 795 forks source link

NodeDataModel::setNodeStyle() is of no effect #377

Open scarsty opened 1 year ago

scarsty commented 1 year ago

I have found that the node style for a special node is of no use. After checking the implement of DataFlowGraphModel::nodeData, I think these code maybe not right:

    case NodeRole::Style: {
        auto style = StyleCollection::nodeStyle();        
        result = style.toJson().toVariantMap();

Here a global node style is returned, so the specialed style for a node does not work.

I guess here should be:

        auto style = model->nodeStyle();

Or there are any reasons to return a global style?