rnote icon indicating copy to clipboard operation
rnote copied to clipboard

"Duplicate Selection" moves objects not by a multiple snapping-distance

Open defini-tiv opened this issue 1 year ago • 1 comments

Describe the bug
If you duplicate an object, its duplicate is offset in a way that you can't realign it horizontally or vertically with the original without turning of snapping.

To Reproduce
Steps to reproduce the behavior:

  1. Turn on snapping
  2. Go in Selection mode
  3. Select an object
  4. Click on 'Duplicate Selection'
  5. Try to align the duplicate with the original

Expected behavior
Duplicating an object should offset the duplication a multiple of the snapping-distance

Desktop (please complete the following information):

  • App Version: [v0.11.0]

defini-tiv avatar Oct 03 '24 11:10 defini-tiv

Actually, even changing the duplicate selection offset to be a multiple of the snapping distance, trying to align the duplicate with the original wouldn't be fixed if I understand correctly what you're doing.

As of now the snapping to the grid is with respect to the bounds of the objects, and not made to make relative displacements be multiples of the grid size (could be a second mode for the snapping).

Though in this case using a multiple of the grid size for the offset when duplicating works in both case (duplicated object still snapped for both definitions) so it makes sense to add this in the code

Doublonmousse avatar Oct 12 '24 04:10 Doublonmousse