Commit f545e0b0 authored by Albert Gräf's avatar Albert Gräf
Browse files

Make intelligent patching mode 4 controllable with the ctrl modifier.

Intelligent patching mode 4 often just always prefers option A (outgoing
connections). But if the user actually wants option B (incoming connections),
he can't get it because option A was chosen. This is confusing, which is why
mode 4, while very useful if it works as intended, can be rather difficult to
use right now.

We therefore now take into account the status of the ctrl modifier, which
simply reverses our choice of option A or B, so that the user now has a way of
getting option B even if option A is preferred (and vice versa). If the ctrl
modifier isn't pressed, mode 4 works exactly as before, so this change is
fully backwards-compatible.
parent 92d41f4e
......@@ -4457,7 +4457,10 @@ int canvas_trymulticonnect(t_canvas *x, int xpos, int ypos, int which, int doit)
// now decide which one is better
// (we give preference to option A if both are equal)
if (successA >= successB)
// AG: Also take into account the ctrl mod status, so
// that the user can reverse our default choice (otherwise
// we usually just end up preferring outgoing connections)
if (glob_ctrl ? successA < successB : successA >= successB)
// OPTION A (see description above)
for (sel = x->gl_editor->e_selection; sel; sel = sel->sel_next)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment