Skip to content

Commit

Permalink
[Fix] Pattern tab: Avoid sticky selection key when focus is in anothe…
Browse files Browse the repository at this point in the history
…r view.

git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@21764 56274372-70c3-4bfc-bfc3-4c3a0b034d27
  • Loading branch information
sagamusix committed Sep 26, 2024
1 parent e5e9f53 commit 6b51cc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mptrack/View_pat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ void CViewPattern::SetModified(bool updateAllViews)

bool CViewPattern::IsSelectionPressed() const
{
return CMainFrame::GetInputHandler()->SelectionPressed();
return ::GetFocus() == m_hWnd && CMainFrame::GetInputHandler()->SelectionPressed();
}


Expand Down Expand Up @@ -1165,7 +1165,7 @@ void CViewPattern::OnLButtonDown(UINT nFlags, CPoint point)
SendCtrlMessage(CTRLMSG_PAT_FOLLOWSONG, 0);
}

if(CMainFrame::GetInputHandler()->SelectionPressed()
if(IsSelectionPressed()
&& (m_Status[psShiftSelect]
|| m_Selection.GetUpperLeft() == m_Selection.GetLowerRight()
|| !m_Selection.Contains(pointCursor)))
Expand Down

0 comments on commit 6b51cc0

Please sign in to comment.