[go: up one dir, main page]

[RFC] Paste style should overwrite style not merge

Summary:

"Paste style" combines the style of the source and target objects. It's unclear if this is the intended behavior (hence the RFC); it seems an argument could be made either way.

Steps to reproduce:

  • Open Inkscape
  • Create two objects (e.g. rectangles)
  • Set a fill on one and unset the stroke (must be unset, not none)
  • Set a stroke on the other
  • Copy the first and "paste style" onto the second

What happened?

The second rectangle has both a fill and a stroke.

What should have happened?

The second rectangle should have no stroke? The second rectangle should have both a fill and a stroke?


If it's unintended, the issue is probably this code in ClipboardManagerImpl::pasteStyle:

  set->document()->importDefs(tempdoc.get());
  SPCSSAttr *style = sp_repr_css_attr(clipnode, "style");
  sp_desktop_set_style(set, set->desktop(), style);

...which I suppose should just copy the clipboard object's style as-is.

Edited by Adam Belis