Skip to content

Commit

Permalink
Project: Clear ProjectLoaded event before loading project
Browse files Browse the repository at this point in the history
  • Loading branch information
mat1jaczyyy committed Oct 6, 2020
1 parent d65c500 commit a95d311
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Apollo/Core/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ public static void DebugLog(string text) {
public delegate void ProjectLoadedEventHandler();
public static event ProjectLoadedEventHandler ProjectLoaded;

public static void ClearProjectLoaded() => ProjectLoaded = null;

static Project _project;
public static Project Project {
get => _project;
Expand Down
1 change: 1 addition & 0 deletions Apollo/Elements/Project.cs
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ public void Remove(int index, bool dispose = true) {

public Project(int bpm = 150, int[] macros = null, List<Track> tracks = null, string author = "", long basetime = 0, long started = 0, UndoManager undo = null, string path = "") {
TimeSpent.Start();
Program.ClearProjectLoaded();

BPM = bpm;
Macros = macros?? new int[4] {1, 1, 1, 1};
Expand Down

0 comments on commit a95d311

Please sign in to comment.