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

fix: initial position for dpg.window with popup=True (#1975) #2003

Merged
merged 1 commit into from
Jan 7, 2023

Conversation

v-ein
Copy link
Contributor

@v-ein v-ein commented Jan 6, 2023


name: Pull Request
about: Create a pull request to help us improve
title: A window with popup=True is positioned incorrectly
assignees: @hoffstadt


Closes #1975

Description:
A window can be positioned at the mouse cursor automatically - this auto-positioning is used unless the window got a label at creation. However, the way all calls to DPG API are routed to internal_dpg, the C++ implementation gets all possible parameters no matter whether the user specified them on the initial call. That is, even for dpg.window() without label=something, C++ will see label=None passed in.

This fix corrects auto-positioning by additionally checking that the label is not None.

Concerning Areas:
None.

Copy link
Owner

@hoffstadt hoffstadt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@hoffstadt hoffstadt merged commit a9dcb0d into hoffstadt:master Jan 7, 2023
@v-ein v-ein deleted the bugfix/1975-popup-positioning branch June 23, 2023 07:44
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A window with popup=True is positioned incorrectly
2 participants