hoffstadt / hoffstadt/DearPyGui

Changing window label causing docked window undock

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

Description

## Version of Dear PyGui

Version: 1.3.1
Operating System: macOS 12.2

## My Issue/Question
Changing a docked window label after creation will cause such window to undock itself.

## To Reproduce
Create a window, dock it, then change its label. See minimal example.

## Expected behavior

Changing the window title should not undock such a window.

## Screenshots/Video

![Nickel_2022-02-24_11-14-40](https://user-images.githubusercontent.com/31149605/155504724-c035c0a7-9d5b-45f2-bb56-bcecb0c7ff20.gif)

## Standalone, minimal, complete and verifiable example
```python
import dearpygui.dearpygui as dpg

dpg.create_context()
dpg.configure_app(docking=True, docking_space=True)

with dpg.window(label="Default Label", width=400, height=400, tag="__window", autosize=True):
dpg.add_text("1. Dock me!")
dpg.add_text("2. Click button below. Window label will change.")
dpg.add_button(label="Change window label", callback=lambda: dpg.set_item_label("__window", "New Label"))
dpg.add_text("3. Observe that the window now is undocked.")

dpg.create_viewport(title='DPG', 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.