Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Nodes attributes usually doesn't accept connections #1721

Closed
QuattroMusic opened this issue Apr 23, 2022 · 2 comments
Closed

Nodes attributes usually doesn't accept connections #1721

QuattroMusic opened this issue Apr 23, 2022 · 2 comments
Labels
category: node editor related to node editor state: ready Fixed/Added and will be present in an upcoming release type: bug bug

Comments

@QuattroMusic
Copy link

QuattroMusic commented Apr 23, 2022

Version of Dear PyGui

Version: 1.5.1
Operating System: Windows 10

My Issue

Sometimes node attributes doesn't connect (only when deleting nodes)

To Reproduce

1 - add 3/4 nodes
2 - check every link if it works
3 - if it's all working, go to step 4, else, you found the bug!
4 - select some nodes and delete them
5 - go to step 1

OR

1 - create 6 nodes
2 - delete all of them together
3 - next node won't link

almost 100% of the times

Expected behavior

All the node attributes to work correctly

Video

Untitled.2.mp4

Code

import dearpygui.dearpygui as dpg

dpg.create_context()
dpg.create_viewport()
dpg.setup_dearpygui()

def link_callback(sender, app_data):
    dpg.add_node_link(app_data[0], app_data[1], parent=sender)

def delink_callback(sender, app_data):
    dpg.delete_item(app_data)

def node():
    with dpg.node(parent="node_editor"):
        dpg.add_node_attribute(attribute_type=dpg.mvNode_Attr_Input)
        dpg.add_node_attribute(attribute_type=dpg.mvNode_Attr_Output)

def delete():
    for node in dpg.get_selected_nodes("node_editor"):
        dpg.delete_item(node)

with dpg.window(width=1000,height=700):
    dpg.add_node_editor(tag="node_editor",callback=link_callback, delink_callback=delink_callback)

with dpg.window(pos=[1100,100]):
    dpg.add_button(label="Create Node",callback=node)
    dpg.add_button(label="Delete Nodes",callback=delete)

dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
@QuattroMusic QuattroMusic added state: pending not addressed yet type: bug bug labels Apr 23, 2022
@hoffstadt hoffstadt removed the state: pending not addressed yet label Apr 25, 2022
@hoffstadt
Copy link
Owner

Very odd but confirmed. This appears to be an imnodes bug.

@hoffstadt hoffstadt added category: node editor related to node editor priority: high high priority labels Apr 25, 2022
@hoffstadt
Copy link
Owner

Fixed in next release.

@hoffstadt hoffstadt added the state: ready Fixed/Added and will be present in an upcoming release label Apr 25, 2022
@hoffstadt hoffstadt removed the priority: high high priority label Apr 25, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
category: node editor related to node editor state: ready Fixed/Added and will be present in an upcoming release type: bug bug
Projects
None yet
Development

No branches or pull requests

2 participants