From: tcofoegbu Date: Fri, 21 Aug 2015 13:59:19 +0000 (+0100) Subject: JAL-1834 disabled action buttons (Back / Ok / Cancel) when in 'Configure Displayed... X-Git-Tag: Release_2_10_0~524 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=23278fe32b704fa2d246d34ac17699e9555d00ee;p=jalview.git JAL-1834 disabled action buttons (Back / Ok / Cancel) when in 'Configure Displayed Columns' tab --- diff --git a/src/jalview/jbgui/GPDBSearchPanel.java b/src/jalview/jbgui/GPDBSearchPanel.java index 08a620a..473f634 100644 --- a/src/jalview/jbgui/GPDBSearchPanel.java +++ b/src/jalview/jbgui/GPDBSearchPanel.java @@ -283,14 +283,18 @@ tbl_summary); JTabbedPane sourceTabbedPane = (JTabbedPane) changeEvent .getSource(); int index = sourceTabbedPane.getSelectedIndex(); - btn_ok.setEnabled(false); if (sourceTabbedPane.getTitleAt(index).equals(configureCols)) { + btn_back.setEnabled(false); + btn_cancel.setEnabled(false); + btn_ok.setEnabled(false); previousWantedFields = PDBDocFieldPreferences .getSearchSummaryFields().toArray(new PDBDocField[0]); } if (sourceTabbedPane.getTitleAt(index).equals(searchTabTitle)) { + btn_back.setEnabled(true); + btn_cancel.setEnabled(true); if (wantedFieldsUpdated()) { txt_search_ActionPerformed(); diff --git a/src/jalview/jbgui/GStructureChooser.java b/src/jalview/jbgui/GStructureChooser.java index 9e4e6f3..caba85f 100644 --- a/src/jalview/jbgui/GStructureChooser.java +++ b/src/jalview/jbgui/GStructureChooser.java @@ -324,11 +324,12 @@ public abstract class GStructureChooser extends JPanel implements { JTabbedPane sourceTabbedPane = (JTabbedPane) changeEvent .getSource(); - btn_view.setEnabled(false); int index = sourceTabbedPane.getSelectedIndex(); if (sourceTabbedPane.getTitleAt(index) .equals(configureCols)) { + btn_view.setEnabled(false); + btn_cancel.setEnabled(false); previousWantedFields = PDBDocFieldPreferences .getStructureSummaryFields().toArray( new PDBRestClient.PDBDocField[0]); @@ -336,6 +337,7 @@ public abstract class GStructureChooser extends JPanel implements if (sourceTabbedPane.getTitleAt(index) .equals(foundStructureSummary)) { + btn_cancel.setEnabled(true); if (wantedFieldsUpdated()) { tabRefresh();