ui: edit search element on backspace instead of deleting (issue #681)

This commit is contained in:
Eberhard Graether
2019-03-20 14:47:39 +01:00
parent b02064a160
commit 5d672fafc4
3 changed files with 6 additions and 16 deletions
+1 -11
View File
@@ -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()));