Skip to content

Commit

Permalink
Don't show splash screen at all when launching a second instance manu…
Browse files Browse the repository at this point in the history
…ally
  • Loading branch information
cbjeukendrup committed Jul 5, 2023
1 parent 7a5d587 commit 400415f
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/app/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,21 +166,19 @@ int App::run(int argc, char** argv)
#ifdef MUE_BUILD_APPSHELL_MODULE
SplashScreen* splashScreen = nullptr;
if (runMode == framework::IApplication::RunMode::GuiApp) {
SplashScreen::SplashScreenType type = SplashScreen::Default;
QString fileName;

if (!multiInstancesProvider()->isMainInstance()) {
if (multiInstancesProvider()->isMainInstance()) {
splashScreen = new SplashScreen(SplashScreen::Default);
} else {
project::ProjectFile file = startupScenario()->startupScoreFile();

if (file.isValid()) {
type = SplashScreen::ForNewInstance;
fileName = file.displayName(true /* includingExtension */);
splashScreen = new SplashScreen(SplashScreen::ForNewInstance, file.displayName(true /* includingExtension */));
} else if (startupScenario()->isStartWithNewFileAsSecondaryInstance()) {
type = SplashScreen::ForNewInstance;
splashScreen = new SplashScreen(SplashScreen::ForNewInstance);
}
}
}

splashScreen = new SplashScreen(type, fileName);
if (splashScreen) {
splashScreen->show();
}
#endif
Expand Down

0 comments on commit 400415f

Please sign in to comment.