fix: AMS slot edit icon click detection misses Y-bound check#10859
Open
BenJule wants to merge 3 commits into
Open
fix: AMS slot edit icon click detection misses Y-bound check#10859BenJule wants to merge 3 commits into
BenJule wants to merge 3 commits into
Conversation
5de22e5 to
406bd08
Compare
The upstream build_all.yml only listed 'main' as a push trigger. BenJule/BambuStudio uses 'master' as its default branch, so CI never fired on fork-local pushes. Adding 'master' alongside 'main' makes the full multi-platform build run when master is updated.
AMSLib::on_left_down() checked pos.y >= top but compared top <= bottom instead of pos.y <= bottom for the upper bound. Since top is always <= bottom by construction, the condition was always true, so any click below the icon still triggered the edit event. Replace the tautological top <= bottom with pos.y <= bottom so the hit-test properly constrains both axes.
406bd08 to
3973958
Compare
Contributor
Author
|
Apologies — this PR was closed by mistake on 2026-06-07, and that was an error on my side, not a deliberate decision to withdraw the change. It happened as an unintended side effect of a branch cleanup in my fork: deleting the head branch automatically closed this PR. The contribution still stands. I have restored the branch and reopened the PR. Sorry for the noise and any confusion this caused. |
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.
Summary
AMSLib::on_left_down()checkstop <= bottomas the upper Y bound for the edit-icon hit-test, buttopis always less than or equal tobottomby construction, so this condition is alwaystrue. Any click with the correct X range triggers the edit dialog regardless of how far below the icon the click lands.One-character fix: replace
top <= bottomwithpos.y <= bottom.Applies to all AMS model variants (AMS, N3F, N3S, EXT_SPOOL, AMS_LITE).
Closes #10858
Changed file
src/slic3r/GUI/Widgets/AMSItem.cpp— line 1039Test plan