From 26627ab5662fce527947aee751d39ea26e3acdf1 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 21 Jan 2021 17:18:06 +0000 Subject: [PATCH] JAL-3038 corrected code that reads editable JComboBox text input --- src/jalview/gui/Desktop.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index 39c68a0..abe1fad 100644 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -1192,7 +1192,7 @@ public class Desktop extends jalview.jbgui.GDesktop panel.add(label); /* - * the URL to fetch is + * the URL to fetch is input in * Java: an editable combobox with history * JS: (pending JAL-3038) a plain text field */ @@ -1235,8 +1235,8 @@ public class Desktop extends jalview.jbgui.GDesktop @SuppressWarnings("unchecked") String url = (history instanceof JTextField ? ((JTextField) history).getText() - : ((JComboBox) history).getSelectedItem() - .toString()); + : ((JComboBox) history).getEditor().getItem() + .toString().trim()); if (url.toLowerCase().endsWith(".jar")) { -- 1.7.10.2