summary refs log tree commit diff
path: root/src/TextInputWidget.cpp
diff options
context:
space:
mode:
authorJoseph Donofry <joedonofry@gmail.com>2019-07-21 21:58:48 -0400
committerJoseph Donofry <joedonofry@gmail.com>2019-07-21 21:58:48 -0400
commit49ec388c1d7f393bdf4b615266cecbc0bf6833e1 (patch)
tree28f0d17cdd7bd3ca684016f7622757a4efc25df7 /src/TextInputWidget.cpp
parentUpdate Mentions UI (diff)
parentFix copy and pasting image from clipboard (diff)
downloadnheko-49ec388c1d7f393bdf4b615266cecbc0bf6833e1.tar.xz
Merge branch '0.7.0-dev' of ssh://github.com/Nheko-Reborn/nheko into 0.7.0-dev
Diffstat (limited to 'src/TextInputWidget.cpp')
-rw-r--r--src/TextInputWidget.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/TextInputWidget.cpp b/src/TextInputWidget.cpp

index 1ae26c2d..f723c01a 100644 --- a/src/TextInputWidget.cpp +++ b/src/TextInputWidget.cpp
@@ -306,8 +306,9 @@ FilteredTextEdit::insertFromMimeData(const QMimeData *source) const auto audio = formats.filter("audio/", Qt::CaseInsensitive); const auto video = formats.filter("video/", Qt::CaseInsensitive); - if (!image.empty()) { - showPreview(source, image); + if (source->hasImage()) { + QImage img = qvariant_cast<QImage>(source->imageData()); + previewDialog_.setPreview(img, image.front()); } else if (!audio.empty()) { showPreview(source, audio); } else if (!video.empty()) {