Skip to content

Commit 1b8454b

Browse files
committed
DefautWelcomeService: just display text once
Was creating a display, which also shows the display, and then calling display(welcomeText) on the created display. This would cause the welcome text to show twice.
1 parent e497695 commit 1b8454b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/main/java/org/scijava/welcome/DefaultWelcomeService.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636

3737
import org.scijava.app.AppService;
3838
import org.scijava.command.CommandService;
39-
import org.scijava.display.Display;
4039
import org.scijava.display.DisplayService;
4140
import org.scijava.event.EventHandler;
4241
import org.scijava.event.EventService;
@@ -90,8 +89,7 @@ public void displayWelcome() {
9089
try {
9190
if (welcomeFile.exists()) {
9291
final String welcomeText = textService.asHTML(welcomeFile);
93-
Display<?> display = displayService.createDisplay(welcomeText);
94-
if (display != null) display.display(welcomeText);
92+
displayService.createDisplay(welcomeText);
9593
}
9694
}
9795
catch (final IOException e) {

0 commit comments

Comments
 (0)