Inkscape Forum Inkscape > Snap to grid when pasting

Posted by Vincent Hennebert (Guest)
on 31.07.2008 14:10
(Received via mailing list)
Hi,

Apologies if the issue is already known, but I haven't found anything
by making a Google search.

When I recently switched to Inkscape 0.46, I discovered that objects
are no longer snapped to the grid when pasted from the clipboard. It
used to work before and I was finding that quite handy. In the "Snap"
tab of the Document Properties dialog box I ticked the "Enable
snapping" and "Nodes" options.

The release notes for 0.46 say that grids have undergone big changes.
Did that behaviour get lost during the refactoring? Is that a new
option that I missed?

Many thanks for this wonderful software,
Vincent
Posted by Diederik van Lierop (Guest)
on 31.07.2008 17:50
(Received via mailing list)
Vincent Hennebert wrote:
> When I recently switched to Inkscape 0.46, I discovered that objects
> are no longer snapped to the grid when pasted from the clipboard. [...]
> Did that behaviour get lost during the refactoring? 
>   
Yes, it did get lost. I removed it because it was no longer functioning
properly. I might just as well create something similar again, but I'm
not sure how it should work. Given an object with lots of nodes, which
node should snap to the grid? If all nodes were already aligned to the
grid when copying, then while pasting snapping any node to the grid will
do. But this will not be true in general and there will be nodes both
on- and off-grid. Besides, we can now have multiple grids
simultaneously, which one should we use?

If we know where the clipboard data was originally located (I don't know
if that information is stored), then we might paste at a multiple of the
grid pitch (strictly spoken: that is not snapping, but it will achieve
what you're looking for).

Comments anyone?

Diederik
Posted by bulia byak (Guest)
on 31.07.2008 18:27
(Received via mailing list)
On Thu, Jul 31, 2008 at 12:49 PM, Diederik van Lierop
<mail@diedenrezi.nl> wrote:
> If we know where the clipboard data was originally located (I don't know
> if that information is stored)

Of course it is stored - the objecty is copied with its own transform
and other attributes, and that determines its position. When we "paste
in place", we simply paste and nothing else; on regular paste, we
paste and then move the pasted stuff to the point under cursor. This
also answers your other question on snapping: paste should snap
exactly the same as if the original object, without any copy/paste,
was just dragged by mouse to the current location in Selector.

--
bulia byak
Inkscape. Draw Freely.
http://www.inkscape.org
Posted by Diederik van Lierop (Guest)
on 31.07.2008 20:34
(Received via mailing list)
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's 
challenge
Build the coolest Linux based applications with Moblin SDK & win great 
prizes
Grand prize is a trip for two to an Open Source event anywhere in the 
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Posted by bulia byak (Guest)
on 31.07.2008 21:40
(Received via mailing list)
On Thu, Jul 31, 2008 at 3:04 PM, Diederik van Lierop 
<mail@diedenrezi.nl> wrote:
> But if we only snap to grids, then it would make more sense to me if we'd
> use a multiple of the grid-pitch, instead of really snapping to the grid.

You mean, move the paste objects by a multiple of the grid-pitch?
That would make sense I think - so it will not really snap, but just
keep it being snapped if it already was.

--
bulia byak
Inkscape. Draw Freely.
http://www.inkscape.org
Posted by Vincent Hennebert (Guest)
on 01.08.2008 12:31
(Received via mailing list)
Thanks for your quick answers :-)

bulia byak wrote:
> On Thu, Jul 31, 2008 at 3:04 PM, Diederik van Lierop <mail@diedenrezi.nl> wrote:
>> But if we only snap to grids, then it would make more sense to me if we'd
>> use a multiple of the grid-pitch, instead of really snapping to the grid.
> 
> You mean, move the paste objects by a multiple of the grid-pitch?
> That would make sense I think - so it will not really snap, but just
> keep it being snapped if it already was.

Pasting at a multiple of the grid-pitch looks like a reasonable solution
to me. Shall I open a bug report to keep track of the issue, or is it
unnecessary?

Thanks,
Vincent
Posted by Abrolag (Guest)
on 01.08.2008 21:40
(Received via mailing list)
On Fri, 01 Aug 2008 11:30:51 +0100
Vincent Hennebert <vhennebert@gmail.com> wrote:

> 
> Pasting at a multiple of the grid-pitch looks like a reasonable solution
> to me. Shall I open a bug report to keep track of the issue, or is it
> unnecessary?
> 
> Thanks,
> Vincent

I'd like to see this too.

--
Will J Godfrey
http://www.musically.me.uk
Posted by Diederik van Lierop (Guest)
on 02.08.2008 09:01
(Received via mailing list)
Vincent Hennebert wrote:
> Pasting at a multiple of the grid-pitch looks like a reasonable solution
> to me. Shall I open a bug report to keep track of the issue, or is it
> unnecessary?
>   

You can if you want to keep track of it, but it's already on my TODO
list so it will be implemented sooner or later.
Diederik
Posted by Diederik van Lierop (Guest)
on 06.08.2008 23:33
(Received via mailing list)
Vincent Hennebert wrote:
> Pasting at a multiple of the grid-pitch looks like a reasonable solution
> to me. 
It's been re-invented and committed to SVN. Please be alert for any bugs
I might have introduced.

Regards,

Diederik