Prevent scene hierarchy widget rescaling on left border#3062
Open
lilac0o0 wants to merge 1 commit intof3d-app:masterfrom
Open
Prevent scene hierarchy widget rescaling on left border#3062lilac0o0 wants to merge 1 commit intof3d-app:masterfrom
lilac0o0 wants to merge 1 commit intof3d-app:masterfrom
Conversation
- fix for issue f3d-app#3016 - Added a check that sees if the cursor x position is close to the left border of the window, if so prevents rescaling. - Added a test to see if the check is registered and no Interactions occur.
Author
|
\ci fast |
snoyer
reviewed
Apr 30, 2026
Comment on lines
+602
to
+609
| if (gotMousePosition.x - 7 <= posX && ImGui::IsAnyItemActive() == false) | ||
| { | ||
| ImGui::Begin("Scene Hierarchy", nullptr, flags | ImGuiWindowFlags_NoResize); | ||
| } | ||
| else | ||
| { | ||
| ImGui::Begin("Scene Hierarchy", nullptr, flags); | ||
| } |
Contributor
There was a problem hiding this comment.
Suggested change
| if (gotMousePosition.x - 7 <= posX && ImGui::IsAnyItemActive() == false) | |
| { | |
| ImGui::Begin("Scene Hierarchy", nullptr, flags | ImGuiWindowFlags_NoResize); | |
| } | |
| else | |
| { | |
| ImGui::Begin("Scene Hierarchy", nullptr, flags); | |
| } | |
| if (gotMousePosition.x - posX <= 7 && ImGui::IsAnyItemActive() == false) | |
| { | |
| flags |= ImGuiWindowFlags_NoResize; | |
| } | |
| ImGui::Begin("Scene Hierarchy", nullptr, flags); |
I think it's simpler to modify flags instead of calling ImGui::Begin in each branch.
Also a - b <= threshold is more readable IMO. At first glance I'd even expect it to be abs(a - b) <= threshold, is that applicable here?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your changes
Added a check that sees if the cursor x position is close to the left border of the window, if so prevents rescaling.
Added a test to see if the check is registered and no Interactions occur.
Issue ticket number and link if any
Checklist for finalizing the PR
// bug fix, so i don't know if i need documentation
.github/workflows/versions.json, I have updateddocker_timestampAI Disclosure
Continuous integration