hoffstadt / hoffstadt/DearPyGui

Right-clicking legend does not pop up button

Open
#2,409 7 comments 0 reactions 0 assignees View on GitHub
state: pending type: bug
Dominant language
C++
Stars
15.6k
Forks
783
PR merge metrics
No merged PRs in 30d

Description

## Version of Dear PyGui

Version: 2.0.0
Operating System: Windows 11

## My Issue/Question

After adding the dpg.add_drag_line(), right-clicking legend does not pop up button.

## To Reproduce

```python
# Here's some code anyone can copy and paste to reproduce your issue
import dearpygui.dearpygui as dpg
from math import sin

dpg.create_context()

sindatax = []
sindatay = []
for i in range(0, 100):
sindatax.append(i / 100)
sindatay.append(0.5 + 0.5 * sin(50 * i / 100))

with dpg.window(label="Tutorial", width=400, height=400):
# create plot
dpg.add_text("Right click a series in the legend!")
with dpg.plot(label="Line Series", height=-1, width=-1):
dpg.add_plot_legend()
dpg.add_drag_line() # Here is problem

dpg.add_plot_axis(dpg.mvXAxis, label="x")
dpg.add_plot_axis(dpg.mvYAxis, label="y", tag="yaxis")

# series 1
dpg.add_line_series(sindatax, sindatay, label="series 1", parent="yaxis", tag="series_1")
dpg.add_button(label="Delete Series 1", parent=dpg.last_item(), callback=lambda: dpg.delete_item("series_1"))

# series 2
dpg.add_line_series(sindatax, sindatay, label="series 2", parent="yaxis", tag="series_2")
dpg.add_button(label="Delete Series 2", parent=dpg.last_item(), callback=lambda: dpg.delete_item("series_2"))

dpg.create_viewport(title='Custom Title', width=800, height=600)
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.