From 0b5c02dc773c5087106a0e6066106cd5d2c00e70 Mon Sep 17 00:00:00 2001 From: Christian Fillion Date: Tue, 10 Sep 2024 13:34:50 -0400 Subject: [PATCH] always restore master track auto-icon rules when loading projects [p=2802388] (#1889) REAPER does not store master track icon in the project file. Icons on the master track might be a bug that SWS exploits(?). Master track rules used to be applied on every project load from SWSTimeSlice::SetTrackListChange before Autocolor's ProcessExtensionLine. b95beb0fc9d84d6a25fbd46cd62be47d7789b4c8 changed the timing to run auto-coloring only once asynchronously (on the next timer tick). --- Color/Autocolor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Color/Autocolor.cpp b/Color/Autocolor.cpp index ff196cdea..390c55a75 100644 --- a/Color/Autocolor.cpp +++ b/Color/Autocolor.cpp @@ -1204,7 +1204,8 @@ static bool ProcessExtensionLine(const char *line, ProjectStateContext *ctx, boo GUID g; stringToGuid(lp.gettoken_str(0), &g); MediaTrack* tr = GuidToTrack(&g); - if (tr) + // not loading master track cache to always re-apply rules (icon isn't persisted in RPP) + if (tr && tr != GetMasterTrack(nullptr)) { auto rt = g_pACTracks.Get()->insert(tr).first; rt->m_col = ImportColor(lp.gettoken_int(1));