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
915 _saveAvatarOverrideUrl = true;915 _saveAvatarOverrideUrl = true;
916 }916 }
917 917
918 QString defaultScriptsLocation = getCmdOption(argc, constArgv, "--scripts");
919 if (!defaultScriptsLocation.isEmpty()) {
920 PathUtils::defaultScriptsLocation(defaultScriptsLocation);
921 }
922
923 _glWidget = new GLCanvas();918 _glWidget = new GLCanvas();
924 getApplicationCompositor().setRenderingWidget(_glWidget);919 getApplicationCompositor().setRenderingWidget(_glWidget);
925 _window->setCentralWidget(_glWidget);920 _window->setCentralWidget(_glWidget);
@@ -1186,7 +1181,12 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 260 unmodified lines
1186 // do this as late as possible so that all required subsystems are initialized1181 // do this as late as possible so that all required subsystems are initialized
1187 // If we've overridden the default scripts location, just load default scripts1182 // If we've overridden the default scripts location, just load default scripts
1188 // otherwise, load 'em all1183 // 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()) {
1190 scriptEngines->loadDefaultScripts();1190 scriptEngines->loadDefaultScripts();
1191 scriptEngines->defaultScriptsLocationOverridden(true);1191 scriptEngines->defaultScriptsLocationOverridden(true);
1192 } else {1192 } else {