History

make scripts tree show scripts in directory passed in with --scripts

David Kelly committed 9 years ago

Commit 9417a171 parent 20f713a2 files · +16 −6Browse files

Showing the changes to interface/src/Application.cpp (1 of 2 files). Show all

Unified · Split

interface/src/Application.cpp+6−6
@@ -915,11 +915,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 914 unmodified lines
915915 _saveAvatarOverrideUrl = true;
916916 }
917917
918− QString defaultScriptsLocation = getCmdOption(argc, constArgv, "--scripts");
919− if (!defaultScriptsLocation.isEmpty()) {
920− PathUtils::defaultScriptsLocation(defaultScriptsLocation);
921− }
922−
923918 _glWidget = new GLCanvas();
924919 getApplicationCompositor().setRenderingWidget(_glWidget);
925920 _window->setCentralWidget(_glWidget);
@@ -1186,7 +1181,12 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 260 unmodified lines
11861181 // do this as late as possible so that all required subsystems are initialized
11871182 // If we've overridden the default scripts location, just load default scripts
11881183 // otherwise, load 'em all
1189− if (!defaultScriptsLocation.isEmpty()) {
1184+
1185+ // we just want to see if --scripts was set, we've already parsed it and done
1186+ // the change in PathUtils. Rather than pass that in the constructor, lets just
1187+ // look (this could be debated)
1188+ QDir defaultScriptsLocation(getCmdOption(argc, constArgv, "--scripts"));
1189+ if (!defaultScriptsLocation.exists()) {
11901190 scriptEngines->loadDefaultScripts();
11911191 scriptEngines->defaultScriptsLocationOverridden(true);
11921192 } else {