]> git.lyx.org Git - lyx.git/commit
Fix pasting of PDF from clipboard
authorScott Kostyshak <skostysh@lyx.org>
Sat, 9 May 2015 03:26:57 +0000 (23:26 -0400)
committerScott Kostyshak <skostysh@lyx.org>
Sun, 10 May 2015 00:46:43 +0000 (20:46 -0400)
commitc12dc2feef5ec7be6ab28a927397e944e053e000
treec17514bdee334e00f3cd9e841aa1e061cfd37a8b
parent94f6bf3367df7ac93e9432f27a8f61e357309bd5
Fix pasting of PDF from clipboard

The command "paste pdf" was always disabled because the
condition in the following "if" statement always returns false

  if (arg == "pdf" && (type = Clipboard::PdfGraphicsType))

The value of "type" is zero in this case because PdfGraphicsType is
the first enum value (and it is not set explicitly to non-zero).

An alternative patch is to put AnyGraphicsType as the first
element of enum GraphicsType, or to set the first element to a
number greater than 0.

To test the bug that this commit fixes, either copy a PDF and try to
paste with the action "paste pdf", or click on the "Edit" menu and
notice (before this commit) the terminal output "Unrecognized
graphics type: pdf".
src/Text3.cpp