File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed
Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ void CInstrumentEditDlg::ClearPanels()
165165 m_iInstrument = -1 ;
166166}
167167
168- void CInstrumentEditDlg::SetCurrentInstrument (int Index)
168+ void CInstrumentEditDlg::SetCurrentInstrument (int Index, bool Focus )
169169{
170170 CFamiTrackerDoc *pDoc = CFamiTrackerDoc::GetDoc ();
171171 std::shared_ptr<CInstrument> pInstrument = pDoc->GetInstrument (Index);
@@ -220,6 +220,7 @@ void CInstrumentEditDlg::SetCurrentInstrument(int Index)
220220 for (int i = 0 ; i < PANEL_COUNT; ++i) {
221221 if (m_pPanels[i] != NULL ) {
222222 m_pPanels[i]->SelectInstrument (pInstrument);
223+ if (Focus) m_pPanels[i]->SetFocus ();
223224 }
224225 }
225226
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ class CInstrumentEditDlg : public CDialog
3434 virtual ~CInstrumentEditDlg ();
3535
3636 void ChangeNoteState (int Note);
37- void SetCurrentInstrument (int Index);
37+ void SetCurrentInstrument (int Index, bool Focus = true );
3838 float GetRefreshRate () const ; // // //
3939 void SetRefreshRate (float Rate); // // //
4040 bool IsOpened () const ;
Original file line number Diff line number Diff line change @@ -75,8 +75,6 @@ void CInstrumentEditorSeq::SelectInstrument(std::shared_ptr<CInstrument> pInst)
7575 SetDlgItemInt (IDC_SEQ_INDEX, m_pInstrument->GetSeqIndex (m_iSelectedSetting = Sel));
7676
7777 SelectSequence (m_pInstrument->GetSeqIndex (m_iSelectedSetting), m_iSelectedSetting);
78-
79- SetFocus ();
8078}
8179
8280void CInstrumentEditorSeq::SelectSequence (int Sequence, int Type)
Original file line number Diff line number Diff line change @@ -995,7 +995,8 @@ void CMainFrame::SelectInstrument(int Index)
995995
996996 // Update instrument editor
997997 if (m_wndInstEdit.IsOpened ())
998- m_wndInstEdit.SetCurrentInstrument (Index);
998+ // Do not shift focus when selecting the instrument due to a instrument column edit
999+ m_wndInstEdit.SetCurrentInstrument (Index, false );
9991000 }
10001001 else {
10011002 // Remove selection
You can’t perform that action at this time.
0 commit comments