Skip to content

Commit

Permalink
fix: Revert setImageData on copy
Browse files Browse the repository at this point in the history
回退拷贝图像数据的修改,会导致 1070 wayland
下拷贝无图片显示,仅在定制分支保留

Log: 回退拷贝图像数据的修改
  • Loading branch information
rb-union authored and starhcq committed Jan 24, 2024
1 parent 679eed6 commit fe68a31
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libimageviewer/unionimage/baseutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,14 @@ void copyImageToClipboard(const QStringList &paths, const QImage &sourceImage)
gnomeFormat.remove(gnomeFormat.length() - 1, 1);
newMimeData->setData("x-special/gnome-copied-files", gnomeFormat);

// Warning: 会导致 1070 wayland 下拷贝无图片显示,此修改和 bug 191601 有关,仅在定制镜像保留。
Q_UNUSED(sourceImage);
#if 0
// Copy Image Data
if (!sourceImage.isNull() && checkWayland()) {
newMimeData->setImageData(sourceImage.scaled(200, 200, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation));
}
#endif

// Set the mimedata
cb->setMimeData(newMimeData, QClipboard::Clipboard);
Expand Down

0 comments on commit fe68a31

Please sign in to comment.