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

[ui]: Introduction of multiple ways to remove Node Edges #2644

Draft
wants to merge 12 commits into
base: develop
Choose a base branch
from

Conversation

waaake
Copy link
Contributor

@waaake waaake commented Jan 13, 2025

Description

This PR introduces various methods to remove Node edges within the Graph. These methods enhance the usability of the Node Graph by providing users with multiple options to managed node egde connections.

Details of the Change:

The various methods include,

  • Context Menu Change -> Right click on an edge now shows a popup.
  • Fix -> Alt + Click on the Edge was not working after Qt6 Migration and is now fixed.
  • Added functionality to remove all incoming and outgoing connections of nodes which are not present in the current selection
  • This feature can be accessed using various ways, Right click on Node > Disconnect Node(s)
  • Selecting Node(s) and Pressing X on the Keyboard
  • Selecting Node(s) and shaking them.
  • Another way is to Press and Hold Ctrl and Alt on the Keyboard and Left click + Drag on the edges, this generates the EdgeSelectionLine and whatever edges this has intersected with will get removed.

Features list

Implementation remarks

waaake added 12 commits January 12, 2025 17:10
With PySide6 the modifiers are now enum.Flag based. Updated type ensures the alt+mouse click removes edges from graphs
This function is responsible to disconnect any edges incoming and outgoing edges from the nodes which do not lie in the current selection
Node shake is detected when the node starts changins positions after being clicked and it is tracked via a timer to consider a shake.

Emits the shaked signal when the node is shaked
…agonal agasint the Edge Path

If an edge or shape were to cut the edge, the intersection of the shake is detected by this function
This method allows removal of edges from the graph by index of the edge
The drawn edge is checked for intersection with individual node edges and any edge found interesecting is emitted when the selection ends
Upon selection end the found intersected edges gets removed
@waaake waaake self-assigned this Jan 13, 2025
Copy link

codecov bot commented Jan 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.93%. Comparing base (3e8b736) to head (bf72cf8).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2644   +/-   ##
========================================
  Coverage    69.93%   69.93%           
========================================
  Files          121      121           
  Lines         7088     7088           
========================================
  Hits          4957     4957           
  Misses        2131     2131           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@waaake waaake changed the title [ui] [ui]: Introduction of multiple ways to remove Node Edges Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant