Skip to content

Commit a6bf3cf

Browse files
committed
DisplayPostprocessor: resolve displayed outputs
When a module output is successfully displayed, we mark it resolved, so that any downstream postprocessors know the output was handled.
1 parent cfb0659 commit a6bf3cf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/org/scijava/display/DisplayPostprocessor.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,11 @@ public void process(final Module module) {
6868
if (displayService == null) return;
6969

7070
for (final ModuleItem<?> outputItem : module.getInfo().outputs()) {
71+
if (module.isOutputResolved(outputItem.getName())) continue;
7172
final Object value = outputItem.getValue(module);
7273
final String name = defaultName(outputItem);
73-
handleOutput(name, value);
74+
final boolean resolved = handleOutput(name, value);
75+
if (resolved) module.resolveOutput(name);
7476
}
7577
}
7678

0 commit comments

Comments
 (0)