lmms icon indicating copy to clipboard operation
lmms copied to clipboard

Fix sensitivity of tangent editing in Automation Editor

Open regulus79 opened this issue 7 months ago • 3 comments

Previously, the sensitivity of the tangent editing in the automation editor was hardcoded so that it would change the internal value by the number of pixels the mouse moved up (with a bit of scaling based on the x position too). This is not correct, since it does not respect the zoom of the editor or the min/max values relative to the window size.

This PR adds the correct scaling constant to the tanget value to convert pixels to levels. The automation editor already had the right constant as a member variable, m_y_delta, but it would only update when using the hardcoded zoom levels, so I reworked it to also work for auto zoom.

image

regulus79 avatar Jun 10 '25 16:06 regulus79

Very minor issue: I noticed that the little handle still doesn't quite line up with the mouse. When dragging it in an empty not-connected automation clip, it lines up perfectly with the mouse. But on a clip connected to the volume knob I have to hold the cursor 8 pixels to the right of the dot to have it line up in the Y direction.

allejok96 avatar Jun 14 '25 21:06 allejok96

Very minor issue: I noticed that the little handle still doesn't quite line up with the mouse. When dragging it in an empty not-connected automation clip, it lines up perfectly with the mouse. But on a clip connected to the volume knob I have to hold the cursor 8 pixels to the right of the dot to have it line up in the Y direction.

I can also sort of reproduce this. I assume it's due to imprecisions since m_y_delta is an int. But now I've changed it to be a float, so hopefully it's fixed in the most recent commit?

regulus79 avatar Jun 14 '25 22:06 regulus79

Works like a charm now!

allejok96 avatar Jun 14 '25 23:06 allejok96