Commit c9aeecaaf895de520f4c6a0e3dba262d67fcd57c

Authored by Josh Klontz
1 parent bdf861b4

helpful when debugging to not have to jump between stack traces of different threads

Showing 1 changed file with 2 additions and 1 deletions
openbr/openbr_plugin.cpp
@@ -1166,7 +1166,8 @@ void Transform::project(const TemplateList &src, TemplateList &dst) const @@ -1166,7 +1166,8 @@ void Transform::project(const TemplateList &src, TemplateList &dst) const
1166 dst.append(Template()); 1166 dst.append(Template());
1167 QFutureSynchronizer<void> futures; 1167 QFutureSynchronizer<void> futures;
1168 for (int i=0; i<dst.size(); i++) 1168 for (int i=0; i<dst.size(); i++)
1169 - futures.addFuture(QtConcurrent::run(_project, this, &src[i], &dst[i])); 1169 + if (Globals->parallelism > 1) futures.addFuture(QtConcurrent::run(_project, this, &src[i], &dst[i]));
  1170 + else _project(this, &src[i], &dst[i]);
1170 futures.waitForFinished(); 1171 futures.waitForFinished();
1171 } 1172 }
1172 1173