Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Kate
Commits
596d41b5
Commit
596d41b5
authored
May 18, 2021
by
Mark Nauwelaerts
Browse files
S&R: uncheck all upon Esc
... as was the behaviour previously
parent
a467423a
Changes
3
Hide whitespace changes
Inline
Side-by-side
addons/search/MatchModel.cpp
View file @
596d41b5
...
...
@@ -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
())
{
...
...
addons/search/MatchModel.h
View file @
596d41b5
...
...
@@ -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.
...
...
addons/search/plugin_search.cpp
View file @
596d41b5
...
...
@@ -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
();
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment