Skip to content

Commit e6eb56c

Browse files
author
Brig Bagley
committed
Merge branch 'master' into brig_work
2 parents 9a2beb2 + c989fae commit e6eb56c

File tree

7 files changed

+479
-49
lines changed

7 files changed

+479
-49
lines changed

src/Core/Command/GlobalCommandBuilderFromCommandLine.cc

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,21 +73,25 @@ using namespace SCIRun::Core::Commands;
7373

7474
if (!params->inputFiles().empty())
7575
{
76-
for (int i = 0; i < params->inputFiles().size(); ++i)
76+
const int last = 1;
77+
//TODO: support multiple files loaded--need to be able to execute and wait for each before loading next. See #825
78+
// last = params->inputFiles().size()
79+
for (int i = 0; i < last; ++i)
7780
{
7881
q->enqueue(cmdFactory_->create(LoadNetworkFile, i));
82+
83+
if (params->executeNetwork())
84+
q->enqueue(cmdFactory_->create(ExecuteCurrentNetwork));
85+
else if (params->executeNetworkAndQuit())
86+
{
87+
if (i == last - 1)
88+
q->enqueue(cmdFactory_->create(SetupQuitAfterExecute));
89+
q->enqueue(cmdFactory_->create(ExecuteCurrentNetwork));
90+
}
7991
}
8092
}
8193
else if (params->pythonScriptFile())
8294
q->enqueue(cmdFactory_->create(RunPythonScript));
8395

84-
if (params->executeNetwork())
85-
q->enqueue(cmdFactory_->create(ExecuteCurrentNetwork));
86-
else if (params->executeNetworkAndQuit())
87-
{
88-
q->enqueue(cmdFactory_->create(SetupQuitAfterExecute));
89-
q->enqueue(cmdFactory_->create(ExecuteCurrentNetwork));
90-
}
91-
9296
return q;
9397
}

0 commit comments

Comments
 (0)