From ac5c07ea63cba8977ecd7e0532b17f15f2928392 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Sun, 13 Aug 2023 07:52:55 +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..6ea14944c 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 != nulll && components.size() > 0) { + JFrame f = ImporterAgent.getRegistry().getTaskBar().getFrame(); + FailedImportDialog d = new FailedImportDialog(f, components); + UIUtilities.centerAndShow(d); + } } @Override