Skip to content

Commit 86a8c33

Browse files
committed
Process stdout fragments before outputting statistics
Ensures that output appears in the correct order
1 parent 6e324c8 commit 86a8c33

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

MiniZincIDE/process.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,11 @@ void SolveProcess::processStdout(QString line)
332332

333333
// Can appear in any state
334334
if (trimmed.startsWith("%%%mzn-stat")) {
335+
if (!outputBuffer.isEmpty()) {
336+
// For now, also process any output gragment so it appears in the correct order
337+
emit fragment(outputBuffer.join(""));
338+
outputBuffer.clear();
339+
}
335340
emit statisticOutput(line);
336341
return;
337342
} else if (trimmed.startsWith("%%%mzn-progress")) {

0 commit comments

Comments
 (0)