Commit 6c9a3f93 authored by Sven Strickroth's avatar Sven Strickroth

LogDlg: Clear filter on escape (if set) or exit dialog

This should mitigate issue #2470.
Signed-off-by: Sven Strickroth's avatarSven Strickroth <email@cs-ware.de>
parent b9b2ca8e
......@@ -3154,6 +3154,7 @@ BEGIN
VK_UP, ID_GO_UP, VIRTKEY, ALT, NOINVERT
VK_DOWN, ID_GO_DOWN, VIRTKEY, ALT, NOINVERT
"E", ID_SELECT_SEARCHFIELD, VIRTKEY, CONTROL, NOINVERT
VK_ESCAPE, ID_EXITCLEARFILTER, VIRTKEY, NOINVERT
END
IDR_ACC_COMMITDLG ACCELERATORS
......
......@@ -156,6 +156,7 @@ BEGIN_MESSAGE_MAP(CLogDlg, CResizableStandAloneDialog)
ON_COMMAND(IDC_LOG_JUMPDOWN, &CLogDlg::OnBnClickedJumpDown)
ON_COMMAND(ID_GO_UP, &CLogDlg::OnBnClickedJumpUp)
ON_COMMAND(ID_GO_DOWN, &CLogDlg::OnBnClickedJumpDown)
ON_COMMAND(ID_EXITCLEARFILTER, OnExitClearFilter)
ON_BN_CLICKED(IDC_WALKBEHAVIOUR, OnBnClickedWalkBehaviour)
ON_BN_CLICKED(IDC_VIEW, OnBnClickedView)
ON_BN_CLICKED(IDC_WHOLE_PROJECT, OnBnClickShowWholeProject)
......@@ -3319,3 +3320,13 @@ LRESULT CLogDlg::OnRefreshSelection(WPARAM /*wParam*/, LPARAM /*lParam*/)
}
return 0;
}
void CLogDlg::OnExitClearFilter()
{
if (!m_LogList.m_sFilterText.IsEmpty())
{
OnClickedCancelFilter(NULL, NULL);
return;
}
SendMessage(WM_CLOSE);
}
......@@ -108,6 +108,7 @@ protected:
afx_msg void OnEnLinkMsgview(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnBnClickedStatbutton();
afx_msg void OnSelectSearchField();
afx_msg void OnExitClearFilter();
afx_msg void OnNMCustomdrawChangedFileList(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnLvnGetdispinfoChangedFileList(NMHDR *pNMHDR, LRESULT *pResult);
......
......@@ -1957,6 +1957,7 @@
#define ID_GO_BACKWARD_SELECT 32871
#define ID_GO_FORWARD_SELECT 32872
#define ID_SELECT_SEARCHFIELD 32873
#define ID_EXITCLEARFILTER 32874
// Next default values for new objects
//
......
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