ui: edit search element on backspace instead of deleting (issue #681)
This commit is contained in:
@@ -283,8 +283,7 @@ void QtSmartSearchBox::keyPressEvent(QKeyEvent* event)
|
||||
}
|
||||
else if (!hasSelectedText() && cursorPosition() == 0 && m_cursorIndex > 0)
|
||||
{
|
||||
m_elements[m_cursorIndex - 1]->setChecked(true);
|
||||
deleteSelectedElements();
|
||||
editElement(m_elements[m_cursorIndex - 1]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -595,15 +594,6 @@ void QtSmartSearchBox::onTextEdited(const QString& text)
|
||||
}
|
||||
}
|
||||
|
||||
if (!match.name.empty() && lastMatchIsNoFilter())
|
||||
{
|
||||
if (!m_matches.empty())
|
||||
{
|
||||
matchesChanged = true;
|
||||
}
|
||||
clearMatches();
|
||||
}
|
||||
|
||||
if (matchesChanged)
|
||||
{
|
||||
setEditText(QString::fromStdWString(match.getFullName()));
|
||||
|
||||
Reference in New Issue
Block a user