# HG changeset patch
# User David Barts <n5jrn@me.com>
# Date 1661012389 25200
# Node ID 99a0eb385c9ac238b642fa49466a6206e708b848
# Parent  098c4f5507c7b785ef087ac549b3078c886ccd47
Work around annoying Swing glitch.

diff -r 098c4f5507c7 -r 99a0eb385c9a src/name/blackcap/imageprep/Menus.kt
--- a/src/name/blackcap/imageprep/Menus.kt	Mon Jun 13 11:31:49 2022 -0700
+++ b/src/name/blackcap/imageprep/Menus.kt	Sat Aug 20 09:19:49 2022 -0700
@@ -139,6 +139,11 @@
             currentDirectory = currentOutputDirectory
             selectedFile = File(currentOutputDirectory, outName)
         }
+        /* swing glitch workaround from https://stackoverflow.com/questions/14640103/jfilechooser-not-showing-up */
+        if (!chooser.isVisible()) {
+            chooser.setVisible(true)
+            chooser.requestFocus()
+        }
         if (chooser.showSaveDialog(Application.mainFrame) != JFileChooser.APPROVE_OPTION) {
             return
         }