hoffstadt / hoffstadt/DearPyGui
Node_editor - wrong widget callback
- Dominant language
- C++
- Stars
- 15.6k
- Forks
- 783
- PR merge metrics
- No merged PRs in 30d
Description
## Version of Dear PyGui
Version: 0.6.415
Operating System: Mint 20.1 Cinnamon
## My Issue/Question
In node_editor, if 2 nodes with buttons are stacked on top of each other and the button is clicked, the callback on the bottom node is called instead of the callback of the visible top node.
## To Reproduce
Run the sample and click on 8 - 5 is printed. WRONG
Drag the node to different place and click on 8 again - 8 is printed.
Click on 5 - 5 is printed
## Expected behavior
Correct callback is executed.
## Screenshots/Video


## Standalone, minimal, complete and verifiable example
```python
import dearpygui.core as dc
import dearpygui.simple as ds
with ds.window('1'):
with ds.node_editor('2'):
with ds.node('3'):
with ds.node_attribute('4'):
dc.add_button('5', callback= lambda a, b :print('5'))
with ds.node('6'):
with ds.node_attribute('7'):
dc.add_button('8', callback= lambda a, b :print('8'))
dc.start_dearpygui(primary_window='1')
```
Contributor guide
Assessment
This issue has not been assessed yet.