Skip to content

Commit

Permalink
Filter textbox: don't block Del key (Marker list, Track list, Resources)
Browse files Browse the repository at this point in the history
  • Loading branch information
nofishonfriday committed Apr 1, 2019
1 parent 6963f75 commit db75bb4
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 6 deletions.
15 changes: 13 additions & 2 deletions MarkerList/MarkerList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,19 @@ int SWS_MarkerListWnd::OnKey(MSG* msg, int iKeyState)
{
if (msg->wParam == VK_DELETE)
{
OnCommand(DELETE_MSG, 0);
return 1;
// #1119, don't block Del key in Filter textbox
HWND h = GetDlgItem(m_hwnd, IDC_FILTER);
#ifdef _WIN32
if (msg->hwnd == h)
#else
if (GetFocus() == h)
#endif
return 0;
else
{
OnCommand(DELETE_MSG, 0);
return 1;
}
}
else if (msg->wParam == VK_RETURN)
{
Expand Down
17 changes: 15 additions & 2 deletions SnM/SnM_Resources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1941,8 +1941,21 @@ int ResourcesWnd::OnKey(MSG* _msg, int _iKeyState)
OnCommand(RENAME_MSG, 0);
return 1;
case VK_DELETE:
ClearDeleteSlotsFiles(g_resType, 1);
return 1;
{
// #1119, don't block Del key in Filter textbox
HWND h = GetDlgItem(m_hwnd, IDC_FILTER);
#ifdef _WIN32
if (_msg->hwnd == h)
#else
if (GetFocus() == h)
#endif
return 0;
else
{
ClearDeleteSlotsFiles(g_resType, 1);
return 1;
}
}
case VK_INSERT:
InsertAtSelectedSlot();
return 1;
Expand Down
17 changes: 15 additions & 2 deletions TrackList/Tracklist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,21 @@ int SWS_TrackListWnd::OnKey(MSG* msg, int iKeyState)
TogInMCP();
return 1;
case VK_DELETE:
Main_OnCommand(40005, 0); // remove selected tracks
return 1;
{
// #1119, don't block Del key in Filter textbox
HWND h = GetDlgItem(m_hwnd, IDC_FILTER);
#ifdef _WIN32
if (msg->hwnd == h)
#else
if (GetFocus() == h)
#endif
return 0;
else
{
Main_OnCommand(40005, 0); // remove selected tracks
return 1;
}
}
case VK_F2:
OnCommand(RENAME_MSG, 0);
return 1;
Expand Down
3 changes: 3 additions & 0 deletions whatsnew.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Fixes:
+Don't block Del key in Filter textbox (Marker list, Track list, Resources) (Issue 1119)

!v2.10.0 #1 Featured build (February 6, 2019)
Mega thanks to nofish and cfillion for their many contributions, and X-Raym for doing the tedious work of merging everything into a release.
Recommended use of REAPER 5.965.
Expand Down

0 comments on commit db75bb4

Please sign in to comment.