Open SymExp opened 1 year ago
notice: the code area is not complete. copy the whole code since secssion Standalone, minimal, complete and verifiable example
Really minimal example using dpg.plot
import dearpygui.dearpygui as dpg
dpg.create_context()
with dpg.window():
with dpg.plot():
legend = dpg.add_plot_legend()
dpg.add_plot_axis(dpg.mvXAxis)
dpg.add_plot_axis(dpg.mvYAxis)
dpg.add_line_series([0, 1], [0, 1], parent=dpg.last_item(), label="line1")
dpg.add_button(label="Print legend config", callback=lambda: print(dpg.get_item_configuration(legend)))
dpg.create_viewport(width=800, height=600)
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
I've found this only happens when you show/hide the legend using the plot context menu (i.e. right-clicking on the plot). The show
key in the legend item configuration doesn't update to the new state.
Version of Dear PyGui
Version: 1.6.2. Operating System: Windows 11
My Issue/Question
Plot legend with build-in toggle handles didn't change the image series' 'show' state during switching.
To Reproduce
use the code below to see there isn't any change during switching.
Expected behavior
image serie's 'show' configuration is True when it is rendered and False otherwise.
Screenshots/Video
None
Additional context
Linked with issue #1961
Standalone, minimal, complete and verifiable example
import dearpygui.dearpygui as dpg
def _on_demo_close(sender, app_data, user_data): dpg.delete_item(sender) dpg.delete_item("__demo_texture_container")
if name == "main": dpg.create_context()