Terminal: Fix "Enter does not work after copy"

Change-Id: Ic541ba15f52084bcd9b955af718efc3defc64539
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Marcus Tillmanns
2023-03-20 10:21:21 +01:00
parent 5972452484
commit 2d2eef1c2c

View File

@@ -483,19 +483,12 @@ bool TerminalWidget::setSelection(const std::optional<Selection> &selection)
return false;
}
/*if (m_selection && m_selection->final) {
QClipboard *clipboard = QApplication::clipboard();
if (clipboard->supportsSelection()) {
qCDebug(selectionLog) << "Clearing selection from clipboard";
clipboard->clear(QClipboard::Selection);
}
}*/
m_copyAction.setEnabled(selection.has_value());
m_selection = selection;
if (m_selection && m_selection->final) {
qCDebug(selectionLog) << "Copy enabled:" << selection.has_value();
m_copyAction.setEnabled(selection.has_value());
QClipboard *clipboard = QApplication::clipboard();
if (clipboard->supportsSelection()) {