-
-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Way to obtain destination port of qan::Connector
?
#164
Comments
qan::Connector
?qan::Connector
?
Hi @petrmanek, looking at it ! |
@cneben How is it going? Is there any more information that I can provide? |
Signed-off-by: cneben <[email protected]>
@petrmanek Sorry for the delay, too much work ! Modifications are in f/#167-edge-selection |
Signed-off-by: cneben <[email protected]>
Signed-off-by: cneben <[email protected]>
@cneben Brilliant! I will give that a test but it looks good initially. |
Just tested it, works beautifully. Thank you! |
During implementation of my custom drag-to-connect logic I found that there is no easy way to obtain the destination port item of
qan::Connector
inside myrequestEdgeCreation()
signal handler.The default implementation exposes
getSourcePort()
that allows me to determine from where the drag originated. InconnectorReleased()
the internals ofqan::Connector
also retrieve the destination port that is used to bind the default edge, if enabled. Unfortunately, if I want to create my custom edge using therequestEdgeCreation
signal instead, the destination port is lost in the scope of that function and not accessible anywhere else. I could implement my custom connector for this, however I believe that would be an overkill, especially given that this is would be easy to remedy. Below I propose two alternative solutions to extend the current API.Option 1: add
destinationPort
as a property ofqan::Connector
This property can be set somewhere around here and later accessed by user code in
requestEdgeCreation()
.Option 2: pass destination port in the signal
This is a little bit out of line with the current API but it is less work. When the signal is emitted, it can be passed
dstPort
from here.The text was updated successfully, but these errors were encountered: