Comment 9 for bug 170764

Revision history for this message
Codain (codain) wrote :

Thanks JazzyNico!

Yes this issue was known and this is why I've added two TODO lines in the isEmpty() function: the first patch was working but only with SVG targets (internal and external SVG clipboard).

Looking for a cleaner way of working would have mean to change a little bit the ClipboardManager architecture, so this is what I've done in the second patch (moving private _getBestTarget() to public virtual getBestTarget() ).

Now it works with SVG, bitmaps...

Please note that the clipboard is very rarely empty and that when pasting text inkscape paste nothing if no text object is selected.

A TODO item would probably be to detect this case and create a default text object but I think it's not the point here as soon as it's not the default behaviour when pasting from CTRL+V or Edit menu (in my opinion it should be a default behaviour).