From: <sv...@op...> - 2024-06-01 13:58:49
|
Author: sagamusix Date: Sat Jun 1 15:58:36 2024 New Revision: 20895 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20895 Log: Merged revision(s) 20884-20885, 20888-20889 from trunk/OpenMPT: [Fix] General tab: In r14537, drawing of the background of some regions in the lower half of the general tab under some circumstances (strangely, it appears to depend on whether position of the currently selected tab is right of the rightmost pixel of the dialog resource). This happens because the Z-order of the tab control was changed in that commit. However, putting the tab control bottom-most is required for tooltips to work. Setting the dialog style to WS_EX_COMPOSITED fixes the problem for some reason while keeping tooltips working. ........ [Fix] Allow mptrack.rc to be opened in VS resource editor again. ........ [Fix] General tabs: Updates received from other views could cause unintended data changes (e.g. truncating fractional tempo if it is technically unsupported by current format). ........ [Fix] Previous commit was incomplete. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/mptrack/Ctrl_com.cpp branches/OpenMPT-1.31/mptrack/Ctrl_gen.cpp branches/OpenMPT-1.31/mptrack/mptrack.rc Modified: branches/OpenMPT-1.31/mptrack/Ctrl_com.cpp ============================================================================== --- branches/OpenMPT-1.31/mptrack/Ctrl_com.cpp Sat Jun 1 15:58:00 2024 (r20894) +++ branches/OpenMPT-1.31/mptrack/Ctrl_com.cpp Sat Jun 1 15:58:36 2024 (r20895) @@ -123,8 +123,8 @@ { CommentHint commentHint = hint.ToType<CommentHint>(); if (pHint == this || !commentHint.GetType()[HINT_MODCOMMENTS | HINT_MPTOPTIONS | HINT_MODTYPE]) return; - if (m_nLockCount) return; - m_nLockCount++; + if (IsLocked()) return; + LockControls(); static FontSetting previousFont; FontSetting font = TrackerSettings::Instance().commentsFont; @@ -176,7 +176,7 @@ } m_EditComments.SetRedraw(TRUE); - m_nLockCount--; + UnlockControls(); } Modified: branches/OpenMPT-1.31/mptrack/Ctrl_gen.cpp ============================================================================== --- branches/OpenMPT-1.31/mptrack/Ctrl_gen.cpp Sat Jun 1 15:58:00 2024 (r20894) +++ branches/OpenMPT-1.31/mptrack/Ctrl_gen.cpp Sat Jun 1 15:58:36 2024 (r20895) @@ -247,6 +247,7 @@ const auto resamplingModes = Resampling::AllModes(); + LockControls(); if (hintType == HINT_MPTOPTIONS || updateAll) { CString defaultResampler; @@ -373,6 +374,7 @@ m_VuMeterLeft.InvalidateRect(NULL, FALSE); m_VuMeterRight.InvalidateRect(NULL, FALSE); } + UnlockControls(); } @@ -498,7 +500,7 @@ void CCtrlGeneral::OnTempoChanged() { - if (m_bInitialized && m_EditTempo.GetWindowTextLength() > 0) + if (m_bInitialized && m_EditTempo.GetWindowTextLength() > 0 && !IsLocked()) { TEMPO tempo = m_EditTempo.GetTempoValue(); Limit(tempo, m_tempoMin, m_tempoMax); Modified: branches/OpenMPT-1.31/mptrack/mptrack.rc ============================================================================== --- branches/OpenMPT-1.31/mptrack/mptrack.rc Sat Jun 1 15:58:00 2024 (r20894) +++ branches/OpenMPT-1.31/mptrack/mptrack.rc Sat Jun 1 15:58:36 2024 (r20895) @@ -19,6 +19,10 @@ LANGUAGE LANG_GERMAN, SUBLANG_GERMAN #pragma code_page(1252) +#if !defined(WS_EX_COMPOSITED) +#define WS_EX_COMPOSITED 0x02000000L +#endif + ///////////////////////////////////////////////////////////////////////////// // // Dialog @@ -1694,9 +1698,14 @@ IDD_VIEW_GLOBALS DIALOGEX 0, 0, 422, 326 STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_CHILD +EXSTYLE WS_EX_COMPOSITED FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN CONTROL "",IDC_TABCTRL1,"SysTabControl32",0x0,0,0,412,14 + CONTROL "",IDC_BUTTON9,"Button",BS_OWNERDRAW | BS_FLAT | WS_TABSTOP,66,16,33,11 + CONTROL "",IDC_BUTTON10,"Button",BS_OWNERDRAW | BS_FLAT | WS_TABSTOP,169,16,33,11 + CONTROL "",IDC_BUTTON11,"Button",BS_OWNERDRAW | BS_FLAT | WS_TABSTOP,272,16,33,11 + CONTROL "",IDC_BUTTON12,"Button",BS_OWNERDRAW | BS_FLAT | WS_TABSTOP,375,16,33,11 GROUPBOX "Channel 1",IDC_TEXT1,5,18,99,157 EDITTEXT IDC_EDIT9,10,30,89,12,ES_AUTOHSCROLL GROUPBOX "Channel 2",IDC_TEXT2,108,18,99,157 @@ -1705,10 +1714,6 @@ EDITTEXT IDC_EDIT11,216,30,89,12,ES_AUTOHSCROLL GROUPBOX "Channel 4",IDC_TEXT4,314,18,99,157 EDITTEXT IDC_EDIT12,319,30,89,12,ES_AUTOHSCROLL - CONTROL "",IDC_BUTTON9,"Button",BS_OWNERDRAW | BS_FLAT | WS_TABSTOP,66,16,33,11 - CONTROL "",IDC_BUTTON10,"Button",BS_OWNERDRAW | BS_FLAT | WS_TABSTOP,169,16,33,11 - CONTROL "",IDC_BUTTON11,"Button",BS_OWNERDRAW | BS_FLAT | WS_TABSTOP,272,16,33,11 - CONTROL "",IDC_BUTTON12,"Button",BS_OWNERDRAW | BS_FLAT | WS_TABSTOP,375,16,33,11 LTEXT "Initial Volume:",IDC_STATIC,10,48,45,8 EDITTEXT IDC_EDIT1,63,46,36,12,ES_NUMBER CONTROL "Spin1",IDC_SPIN1,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,95,45,11,14 |