Dreamteck / splines

The official Dreamteck Splines for Unity repository
Apache License 2.0
22 stars 2 forks source link

Prevent point deletion with alt pressed down #7

Closed Kronoxis closed 8 months ago

Kronoxis commented 1 year ago

Issue

As mentioned on Discord, the alt modifier did not prevent the deletion of a point in the Scene view. This is inconsistent behavior with the other point modules.

Change

In this PR we prevent the deletion from happening when the user is looking around the scene with alt+leftClick, just like in the other modules.

I'm not 100% sure whether this check is done at the right time though - I tried to make it consistent with the other modules so that handles keep drawing and only the deletion is prevented. Please verify that this is correctly done.

Handles

When it comes to user experience however, it may be more readable and cleaner to prevent all the additional handles from being drawn as soon as alt is held down. That way it's also immediately noticeable when alt is pressed down that you will not be adding or removing points when you click and drag to look around.

f007ch commented 8 months ago

Thanks! A must-have QoL change that was missed.