ui: Fixed selected text not deleted when pasting into search field (issue #527)

This commit is contained in:
Eberhard Graether
2017-12-10 22:36:32 +01:00
parent ebdf324399
commit 0dcd343026
@@ -448,6 +448,12 @@ void QtSmartSearchBox::keyPressEvent(QKeyEvent* event)
}
else if (event->matches(QKeySequence::Paste))
{
deleteSelectedElements();
if (hasSelectedText())
{
del();
}
setEditText(text() + QApplication::clipboard()->text());
onTextEdited(text());
m_allowTextChange = false;