From 3ffbb68a841ba872f55fe51cee135cf4982e6eb3 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Sun, 13 Aug 2023 07:57:03 +0100 Subject: [PATCH] display failure dialog if any --- .../agents/fsimporter/view/ImporterUIElementLight.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/openmicroscopy/shoola/agents/fsimporter/view/ImporterUIElementLight.java b/src/main/java/org/openmicroscopy/shoola/agents/fsimporter/view/ImporterUIElementLight.java index 6fbf4faa7..0903a9b19 100644 --- a/src/main/java/org/openmicroscopy/shoola/agents/fsimporter/view/ImporterUIElementLight.java +++ b/src/main/java/org/openmicroscopy/shoola/agents/fsimporter/view/ImporterUIElementLight.java @@ -272,9 +272,12 @@ private void updateGUI() { @Override void showFailures() { - JFrame f = ImporterAgent.getRegistry().getTaskBar().getFrame(); - FailedImportDialog d = new FailedImportDialog(f, getMarkedFiles()); - UIUtilities.centerAndShow(d); + Collection components = getMarkedFiles(); + if (components != null && components.size() > 0) { + JFrame f = ImporterAgent.getRegistry().getTaskBar().getFrame(); + FailedImportDialog d = new FailedImportDialog(f, components); + UIUtilities.centerAndShow(d); + } } @Override