diff --git a/src/commands/CommandHandler.cpp b/src/commands/CommandHandler.cpp index f004e8f6b..db9825195 100644 --- a/src/commands/CommandHandler.cpp +++ b/src/commands/CommandHandler.cpp @@ -42,6 +42,11 @@ void CommandHandler::OnReceiveCommand(AppCommandEvent &event) // First retrieve the actual command from the event 'envelope'. Command *cmd = event.GetCommand(); + // JKC: In case the user changed the project, let us track that. + // This saves us the embarrassment (crash) of a new project + // being opened, the old one closed and still trying to act + // on the old one. + SetProject( GetActiveProject() ); // Then apply it to current application & project. Note that the // command may change the context - for example, switching to a // different project.