Skip to content

Commit

Permalink
Fix problem with preview pane painting. Platform.runLater was failing…
Browse files Browse the repository at this point in the history
… to execute from showPreview - not sure as to why
  • Loading branch information
ricemery committed Jan 2, 2018
1 parent 7f9f4ab commit b8315dc
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.chainstaysoftware.filechooser;

import com.chainstaysoftware.filechooser.preview.PreviewPane;
import javafx.application.Platform;
import javafx.scene.Cursor;
import javafx.scene.Node;
import javafx.scene.Scene;
Expand Down Expand Up @@ -42,8 +41,8 @@ void showPreview(final Class<? extends PreviewPane> previewPaneClass,

parent.getScene().setCursor(Cursor.WAIT);

Platform.runLater(() -> new FilesViewRunnable(previewPaneOpt.orElseThrow(IllegalStateException::new),
file));
new FilesViewRunnable(previewPaneOpt.orElseThrow(IllegalStateException::new),
file).run();
}

private class FilesViewRunnable implements Runnable {
Expand Down

0 comments on commit b8315dc

Please sign in to comment.