ui: Fixed selected text not deleted when pasting into search field (issue #527)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user