Fix copying of single cless in Browse Data tab

This was broken in 4b34eb76b5.
This commit is contained in:
Martin Kleusberg
2018-09-28 17:50:30 +02:00
parent 3f8fc34394
commit 549f44d108

View File

@@ -327,7 +327,6 @@ void ExtendedTableWidget::reloadSettings()
void ExtendedTableWidget::copyMimeData(const QModelIndexList& fromIndices, QMimeData* mimeData, const bool withHeaders, const bool inSQL)
{
QModelIndexList indices = fromIndices;
// Remove all indices from hidden columns, because if we don't we might copy data from hidden columns as well which is very
@@ -356,7 +355,7 @@ void ExtendedTableWidget::copyMimeData(const QModelIndexList& fromIndices, QMime
if (img.loadFromData(data.toByteArray()))
{
// If it's an image, copy the image data to the clipboard
qApp->clipboard()->setImage(img);
mimeData->setImageData(img);
return;
} else {
// It it's not an image, check if it's an empty field
@@ -370,7 +369,7 @@ void ExtendedTableWidget::copyMimeData(const QModelIndexList& fromIndices, QMime
}
// The field isn't empty. Copy the text to the clipboard without quoting (for general plain text clipboard)
qApp->clipboard()->setText(data.toByteArray());
mimeData->setText(data.toByteArray());
return;
}
}