Skip to content
Snippets Groups Projects
Commit 8db6ba80 authored by Jan Möbius's avatar Jan Möbius
Browse files

Correctly handle command line scripts

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6374 383ad7c9-94d9-4d36-a494-682f7c89f535
parent cc153314
No related branches found
No related tags found
No related merge requests found
......@@ -106,6 +106,14 @@ void Core::slotExecuteAfterStartup() {
}
for ( uint i = 0 ; i < commandLineFileNames_.size() ; ++i ) {
// Skip scripts here as they will be handled by a different function
QString tmp(commandLineFileNames_[i].first);
if ( tmp.endsWith("ofs") ) {
commandLineScriptNames_.push_back(commandLineFileNames_[i].first);
continue;
}
if (commandLineFileNames_[i].second)
loadObject(DATA_POLY_MESH, commandLineFileNames_[i].first);
else
......@@ -113,8 +121,12 @@ void Core::slotExecuteAfterStartup() {
}
if ( scriptingSupport )
for ( uint i = 0 ; i < commandLineScriptNames_.size() ; ++i )
emit executeFileScript(commandLineScriptNames_[i]);
for ( uint i = 0 ; i < commandLineScriptNames_.size() ; ++i ) {
// Add the full path to the script to set scripting dir right
QString tmp(commandLineScriptNames_[i]);
tmp = QDir::currentPath() + QDir::separator() + tmp;
emit executeFileScript(tmp);
}
if ( !OpenFlipper::Options::gui() && !OpenFlipper::Options::remoteControl())
exitApplication();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment