Skip to content

Commit

Permalink
always restore master track auto-icon rules when loading projects [p=…
Browse files Browse the repository at this point in the history
…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.

b95beb0 changed the timing to run auto-coloring only once asynchronously (on the next timer tick).
  • Loading branch information
cfillion authored Sep 10, 2024
1 parent 6d13284 commit 0b5c02d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Color/Autocolor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 0b5c02d

Please sign in to comment.