From aff3a9128ec31d91708854a4808785ca878d7218 Mon Sep 17 00:00:00 2001 From: Johannes Schultz Date: Mon, 25 Nov 2024 20:50:40 +0000 Subject: [PATCH] Merged revision(s) 22311 from trunk/OpenMPT: [Imp] MIDI Mapping Dialog: Decrease initial loading time if dialog by disabling redraw on dropdowns. ........ git-svn-id: https://source.openmpt.org/svn/openmpt/branches/OpenMPT-1.31@22312 56274372-70c3-4bfc-bfc3-4c3a0b034d27 --- mptrack/MIDIMacroDialog.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/mptrack/MIDIMacroDialog.cpp b/mptrack/MIDIMacroDialog.cpp index e1f438a78df..a4d54a1798f 100644 --- a/mptrack/MIDIMacroDialog.cpp +++ b/mptrack/MIDIMacroDialog.cpp @@ -63,41 +63,51 @@ BOOL CMidiMacroSetup::OnInitDialog() m_EditZxx.SetLimitText(kMacroLength - 1); // Parametered macro selection + m_CbnSFx.SetRedraw(FALSE); for(int i = 0; i < 16; i++) { s.Format(_T("%d (SF%X)"), i, i); m_CbnSFx.AddString(s); } + m_CbnSFx.SetRedraw(TRUE); + m_CbnSFx.SetCurSel(0); // Parametered macro presets - m_CbnSFx.SetCurSel(0); + m_CbnSFxPreset.SetRedraw(FALSE); for(int i = 0; i < kSFxMax; i++) { m_CbnSFxPreset.SetItemData(m_CbnSFxPreset.AddString(m_MidiCfg.GetParameteredMacroName(static_cast(i))), i); } + m_CbnSFxPreset.SetRedraw(TRUE); OnSFxChanged(); // MIDI CC selection box + m_CbnMacroCC.SetRedraw(FALSE); for (int cc = MIDIEvents::MIDICC_start; cc <= MIDIEvents::MIDICC_end; cc++) { s.Format(_T("CC %02d "), cc); s += mpt::ToCString(mpt::Charset::UTF8, MIDIEvents::MidiCCNames[cc]); m_CbnMacroCC.SetItemData(m_CbnMacroCC.AddString(s), cc); } + m_CbnMacroCC.SetRedraw(TRUE); // Z80...ZFF box + m_CbnZxx.SetRedraw(FALSE); for(int zxx = 0x80; zxx <= 0xFF; zxx++) { s.Format(_T("Z%02X"), zxx); m_CbnZxx.AddString(s); } + m_CbnZxx.SetRedraw(TRUE); + m_CbnZxx.SetCurSel(0); // Fixed macro presets - m_CbnZxx.SetCurSel(0); + m_CbnZxxPreset.SetRedraw(FALSE); for(int i = 0; i < kZxxMax; i++) { m_CbnZxxPreset.SetItemData(m_CbnZxxPreset.AddString(m_MidiCfg.GetFixedMacroName(static_cast(i))), i); } + m_CbnZxxPreset.SetRedraw(TRUE); m_CbnZxxPreset.SetCurSel(m_MidiCfg.GetFixedMacroType()); UpdateDialog();