Skip to content
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

Clones poorly located upon creation #627

Closed
bonalex01dev opened this issue May 21, 2021 · 5 comments
Closed

Clones poorly located upon creation #627

bonalex01dev opened this issue May 21, 2021 · 5 comments

Comments

@bonalex01dev
Copy link
Contributor

Problem

When cloning a node with ALT+K the cloned node appear very far in the node graph

Expected behavior:
Cloned node is created close on the left of the source node

Actual behavior: [What actually happened]
Cloned node is created very far of the source node

clone_poorly_located

Steps to Reproduce

  1. select a node
  2. press alt+k
  3. look where the clone is

Versions

  • Natron version/commit All
  • OS version: WIN10
@rodlie rodlie added func:nodegraph type:bug Something isn't working labels May 21, 2021
@devernay
Copy link
Member

devernay commented Jun 3, 2021

Actually the expected behavior is to create the clones:

My guess is that it is supposed to replicate the behavior of "paste".
Do you get a different behavior?

Maybe this should be documented?

@devernay devernay removed the type:bug Something isn't working label Jun 3, 2021
@bonalex01dev
Copy link
Contributor Author

Hi, I think I nailed it:
It seems related to the nodegraph loosing track of what area is actually displayed
To trigger the "clones appear very far" bug, I have to

  • create a node A and select it
  • move the nodegraph view to move A out of the nodegraph view (put it below or to the left of the view)
  • use the center selected node (F shortcut or right click>center on all nodes
  • press Alt+k
  • that's it the clone of A is created very far.

Notes:
The F command doesn't center well the view if the node is outside the view ( ONLY
clone_bug_after_fit
above or to the right)
The problem arise even if you use another node B to make the "f shortcut trick" and then clone node A. That's why I feel like Natron loose track of the actual view.
If zoom level is changed with the F command it seems to make the clone appear even farther. So zoom level seems "forgotten" too.

@bonalex01dev
Copy link
Contributor Author

I see
https://github.com/NatronGitHub/Natron/blob/RB-2.4/Gui/NodeGraph40.cpp#L340 uses QpointF
https://github.com/NatronGitHub/Natron/blob/RB-2.4/Gui/NodeGraph35.cpp#L491 uses QrectF
May it explain why Natron seems to loose track of the zoom level ?

@devernay
Copy link
Member

devernay commented Jun 4, 2021

fixed several NodeGraph issues in dd33485:

  • when using the right-click menu, use the click position to paste, rather than the visible area center (more control)
  • pasting nodes from the menu was also affected
  • fix behavior of "f" key (menu "Center on All Nodes") to always work (use moveRootInternal before centerOn to avoid negative values)
  • this fixes some Navigator issues, but not all (see Node Graph Navigation issues #491)

@bonalex01dev
Copy link
Contributor Author

I tested 2.4.1 Alpha 2 on WIN10. It's great thanks for the motion path goodie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants