fix: 'z' key triggers zoom shortcut instead of typing in text fields#10826
fix: 'z' key triggers zoom shortcut instead of typing in text fields#10826BenJule wants to merge 3 commits into
Conversation
|
@mpaperno Thanks for the feedback! I completely understand where you're coming from, and it’s definitely frustrating when working community code gets sidelined. The main reason I opened this PR (#10826) is that the recent in-house fix was a bit too rigid for certain UI states. Under Windows, when dealing with custom composite panels (like the Checking strictly for a direct By switching to Hopefully, this covers all the edge cases this time around so we can finally put this shortcut issue to rest! |
|
Hi Ben, thanks for the detailed explanation! Could you give me a specific example of what you're describing, in terms of reproducing steps in the UI? I thought I tested every permutation, but I guess not! Thanks, |
|
Sure thing, Max! The issue primarily shows up on Windows when interacting with custom composite fields where the focus lands on the outer container rather than the inner native Here are two easy ways to reproduce it in the current UI: Scenario 1: Filament Calibration Tab
Scenario 2: Object Manipulator Panel (Right-hand Sidebar)
Since |
|
Thanks Ben, Yea, if I understand you correctly, I can't reproduce your examples when using the fix I originally proposed. I haven't tried the current On "scenario 2" maybe I don't understand... Are you referring to editing the numeric fields in the Move and Scale tools? The ImGui ones? (Or is there some other sidebar?) With my original And editing object names (in the tree view, if that's what you mean) was also an example I mentioned specifically in my PR. As well as other fields in the sidebar. I think you already noticed, but my version was using Anyway, thanks again! |
|
You're totally right, Max! If Bambu Lab had merged your original PR (#10619) in the first place, we probably wouldn't even be having this academic discussion right now. Your The mess started because the in-house version that actually made it into To clarify Scenario 2: Because Bambu's current master code only checks the top level of that focused window, it completely misses the fact that a text field is active inside it. That's why the recursion ( I haven't re-tested your exact original branch against the absolute latest master commits, but the main goal here was just to clean up the gaps left by the official in-house patch so Windows users can finally type a 'Z' again without the viewport flying away! Thanks for the great technical exchange, highly appreciate your insights on this! |
a63012e to
3a053e8
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.
…#10684) On Windows, pressing 'z' while a custom TextInput widget was focused triggered the canvas 'zoom to fit' shortcut instead of inserting the character. is_text_entry_focused() only walked up the parent chain; on Windows focus sometimes lands on the outer StaticBox container rather than the inner wxTextCtrl. Extend the check to also scan direct children of the focused window. Closes bambulab#10684
3a053e8 to
61bfade
Compare
Summary
On Windows, pressing 'z' while typing in a custom
TextInputwidget (e.g., filament name in the Calibration tab) triggered the canvas "zoom to fit" shortcut instead of inserting the character.Root cause:
is_text_entry_focused()walked up the parent chain looking for awxTextEntry. On Windows, focus sometimes lands on the outerStaticBoxcontainer (theTextInputwidget itself) rather than on the innerwxTextCtrl. The parent walk never finds awxTextEntryin that case.Fix: Also scan the direct children of the focused window. If any direct child is a
wxTextEntry, treat focus as being in a text field.Test plan
Closes #10684