diff options
| author | Patrick Storz <eduard.braun2@gmx.de> | 2019-10-26 20:47:59 +0000 |
|---|---|---|
| committer | Patrick Storz <eduard.braun2@gmx.de> | 2019-10-26 20:47:59 +0000 |
| commit | 85f8a8b35fc04fc550ca02578092b5580910aea5 (patch) | |
| tree | 9b3ce855127c410efdf494958c1fdfb6f7487f1b /src/ui | |
| parent | Dialogs: improve opacity handling through use of CSS (diff) | |
| download | inkscape-85f8a8b35fc04fc550ca02578092b5580910aea5.tar.gz inkscape-85f8a8b35fc04fc550ca02578092b5580910aea5.zip | |
Clipboard: Fix pasting of image data on Windows
Workaround for what is most likely a gtk bug.
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/clipboard.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp index c9910498e..5d6df02d7 100644 --- a/src/ui/clipboard.cpp +++ b/src/ui/clipboard.cpp @@ -1041,6 +1041,13 @@ bool ClipboardManagerImpl::_pasteImage(SPDocument *doc) // retrieve image data Glib::RefPtr<Gdk::Pixbuf> img = _clipboard->wait_for_image(); +#ifdef _WIN32 + // For some reason the first call to wait_for_image() often fails, despite image data being available + // TODO: Figure out why that is and remove this hack. + if (!img) { + img = _clipboard->wait_for_image(); + } +#endif if (!img) { return false; } |
