Skip to content

Change event propagation order#1024

Open
wawanbreton wants to merge 2 commits intomainfrom
paint-lines
Open

Change event propagation order#1024
wawanbreton wants to merge 2 commits intomainfrom
paint-lines

Conversation

@wawanbreton
Copy link
Contributor

@wawanbreton wawanbreton commented Feb 11, 2026

The active tool is now the first to receive and possibly catch the event. It does seem quite logical to have it before the selection tool because the active tool is the one that should be actually interacting with the user, and the selection is somehow a fallback behavior. This change is required to allow painting on a model and using the shift key without having the selection tool to catch this event and change the selection.

⚠️ Although I tested it thoroughly and saw no issues, there is a risk that some tools-related behavior have changed or are broken, especially for tools provided by external plugins.

Required by Ultimaker/Cura#21393

The active tool is now the first to received and possibly catch the event. It does seem quite logical to have it before the selection tool because the active tool is the one that should be actually interacting with the user, and the selection is somehow a fallback behavior.
This change is required to allow painting on a model and using the shift key without having the selection to catch this event and change the selection.
@github-actions
Copy link

github-actions bot commented Feb 11, 2026

Test Results

1 tests  ±0   0 ✅ ±0   1s ⏱️ ±0s
1 suites ±0   0 💤 ±0 
1 files   ±0   0 ❌ ±0   1 🔥 ±0 

For more details on these errors, see this check.

Results for commit d4008c9. ± Comparison against base commit 9005e1f.

♻️ This comment has been updated with latest results.

@HellAholic HellAholic self-assigned this Feb 11, 2026
@wawanbreton
Copy link
Contributor Author

@HellAholic I found an issue with this change:

  • Have 2 models on the build plate
  • Select model A
  • Select model B -> doesn't work
  • Unselect model A
  • Select model B -> works

I will provide a fix later, but I am a bit afraid it will cause other similar difficult-to-spot issues.

This change is required due to the behavior change in the events propagations to the tools. It also allows multi-selected-objects interactions, e.g. dragging multiple selected objects on the build plate.
@wawanbreton
Copy link
Contributor Author

So I made a fix which requires changing the core tools to adapt to the new behavior. Quite annoying, but on the other hand, the tools now behave better i.r.t multiple objects selections, so it is now possible to e.g. drag multiple selected objects over the build plate.
This could break tools that are provided by external plugins though, so maybe add a big warning in the next SDK change mail ?

@HellAholic
Copy link
Contributor

HellAholic commented Feb 11, 2026

Shift usually locks the draw angle to (π/4)*Int, using it for switching between drawing lines Vs free-form for me doesn't fit.
We use Ctrl / Cmd elsewhere to control the mode of the other tools (Scale: uniform scale), Shift controls the snap to angle checkbox. We can later add shift as the secondary key to lock the drawing angles to (π/4)*Int.
So going with the current design/usability theme of Cura, Locking angle would be Shift, Line vs Free-form could be Ctrl
Alternatively you could get nerdsniped into adding the lock angle with Shift 😝

@wawanbreton
Copy link
Contributor Author

Shift usually locks the draw angle to (π/4)*Int, using it for switching between drawing lines Vs free-form for me doesn't fit. We use Ctrl / Cmd elsewhere to control the mode of the other tools (Scale: uniform scale), Shift controls the snap to angle checkbox. We can later add shift as the secondary key to lock the drawing angles to (π/4)*Int. So going with the current design/usability theme of Cura, Locking angle would be Shift, Line vs Free-form could be Ctrl Alternatively you could get nerdsniped into adding the lock angle with Shift 😝

I had no idea you could use Ctrl for the other tools 😆 however it seems that the mostly adopted convention for drawing lines is indeed the Shift key. For me, Ctrl is only used for multi-selection, but this convention does seem to be fading out nowadays. We can discuss that during next refinement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants