From de9592c0781569ccefd4c115bb36524d6c9deaab Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Thu, 24 Aug 2023 19:53:36 +0100 Subject: [PATCH] JAL-629 Avoid hidden options dialog when saving in headless mode --- src/jalview/gui/AlignExportOptions.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/jalview/gui/AlignExportOptions.java b/src/jalview/gui/AlignExportOptions.java index c776d82..6ca21c7 100644 --- a/src/jalview/gui/AlignExportOptions.java +++ b/src/jalview/gui/AlignExportOptions.java @@ -32,6 +32,7 @@ import javax.swing.JPanel; import jalview.api.AlignExportSettingsI; import jalview.api.AlignViewportI; +import jalview.bin.Jalview; import jalview.io.FileFormatI; import jalview.util.MessageManager; @@ -72,12 +73,9 @@ public class AlignExportOptions extends JPanel public static boolean isNeeded(AlignViewportI viewport, FileFormatI format) { - if (viewport.hasHiddenColumns() || viewport.hasHiddenRows() - || format.isComplexAlignFile()) - { - return true; - } - return false; + return !Jalview.getInstance().isHeadlessMode() + && (viewport.hasHiddenColumns() || viewport.hasHiddenRows() + || format.isComplexAlignFile()); } /** -- 1.7.10.2