]> git.lyx.org Git - features.git/commit
Fix image pasting regression
authorGeorg Baum <baum@lyx.org>
Sat, 13 Jul 2013 08:29:54 +0000 (10:29 +0200)
committerVincent van Ravesteijn <vfr@lyx.org>
Sat, 13 Jul 2013 20:44:20 +0000 (22:44 +0200)
commitc0ea37f33791515a1991151581021092b2022595
tree5dba952edd3c0aeddba1bd7cdcbde1d72ebc7fb9
parent6e69a61d003256a4538af4d49f11fdbddc81fd23
Fix image pasting regression

I introduced a regression in c14b9e67 for pasting images:
If an image is on the clipboard both as PNG and HTML with just an url,
but no plain text, pasting would fail. The reason for this was that
text contents was detected (the HTML code), nd preferred, but actually
pasting it resulted in an empty string, since the HTML import could not
handle the url This error was not checked.
The solution is first to try text paste if both text and image content
is present, and then  try image paste if the text failed.
src/CutAndPaste.cpp
src/CutAndPaste.h
src/Text3.cpp