You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are quite a few resolved issues that touch the subject of "dynamic ports", but I wasn't able to find the solution.
I'm trying to do something very similar as shown in this video, i.e., whenever an input connection is created, +1 input port is added. I've seen the dynamic_ports example, but it's built on top of AbstractGraphModel, which to me seemed unnecessarily complex. Thus decided to use NodeDelegateModel instead, keeping the code on node level.
The issue i'm having is that if I have for example 3 connections and then remove the middle one, the connections will not be shifted, as shown in the video below:
dynamic_ports_bug_1.mp4
If I add portsAboutToBeDeleted and portsDeleted calls (as instructed here) to the overridden inputConnectionDeleted method:
then deleting any connection above other connections will result removing all connections below it, as shown in the video:
dynamic_ports_bug_2.mp4
The std::cout << ci.inPortIndex << std::endl; also shows that inputConnectionDeleted is indeed called for each deleted connection, hinting a recursive behavior. My gut feeling says i've added portsAboutToBeDeleted and portsDeleted to a wrong place, but atm I'm out of ideas, as there is not much to play with in the NodeDelegateModel API. I did skim throuh one of the older commits in a dynamic ports related fork that implemented the desired behavior, but the API seems to have changed quite a bit in v3.
Any help is much appreciated.
The text was updated successfully, but these errors were encountered:
There are quite a few resolved issues that touch the subject of "dynamic ports", but I wasn't able to find the solution.
I'm trying to do something very similar as shown in this video, i.e., whenever an input connection is created, +1 input port is added. I've seen the
dynamic_ports
example, but it's built on top ofAbstractGraphModel
, which to me seemed unnecessarily complex. Thus decided to useNodeDelegateModel
instead, keeping the code on node level.The issue i'm having is that if I have for example 3 connections and then remove the middle one, the connections will not be shifted, as shown in the video below:
dynamic_ports_bug_1.mp4
If I add
portsAboutToBeDeleted
andportsDeleted
calls (as instructed here) to the overriddeninputConnectionDeleted
method:then deleting any connection above other connections will result removing all connections below it, as shown in the video:
dynamic_ports_bug_2.mp4
The
std::cout << ci.inPortIndex << std::endl;
also shows thatinputConnectionDeleted
is indeed called for each deleted connection, hinting a recursive behavior. My gut feeling says i've addedportsAboutToBeDeleted
andportsDeleted
to a wrong place, but atm I'm out of ideas, as there is not much to play with in theNodeDelegateModel
API. I did skim throuh one of the older commits in a dynamic ports related fork that implemented the desired behavior, but the API seems to have changed quite a bit in v3.Any help is much appreciated.
The text was updated successfully, but these errors were encountered: