Commit 596d41b5 authored by Mark Nauwelaerts's avatar Mark Nauwelaerts
Browse files

S&R: uncheck all upon Esc

... as was the behaviour previously
parent a467423a
......@@ -1027,6 +1027,14 @@ bool MatchModel::setData(const QModelIndex &itemIndex, const QVariant &, int rol
return true;
}
void MatchModel::uncheckAll()
{
for (int i = 0; i < m_matchFiles.size(); ++i) {
setFileChecked(i, false);
}
m_infoCheckState = Qt::Unchecked;
}
Qt::ItemFlags MatchModel::flags(const QModelIndex &index) const
{
if (!index.isValid()) {
......
......@@ -97,6 +97,8 @@ public:
void updateMatchRanges(const QVector<KTextEditor::MovingRange *> &ranges);
void uncheckAll();
public Q_SLOTS:
/** This function returns the row index of the specified file.
......
......@@ -649,6 +649,11 @@ void KatePluginSearchView::handleEsc(QEvent *e)
} else if (m_toolView->isVisible()) {
m_mainWindow->hideToolView(m_toolView);
}
// uncheck all so no new marks are added again when switching views
Results *curResults = qobject_cast<Results *>(m_ui.resultTabWidget->currentWidget());
if (curResults) {
curResults->matchModel.uncheckAll();
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment