JAL-1370 correct i18n message for reference sequence entry in popup menu
[jalview.git] / src / jalview / jbgui / GStructureChooser.java
index 9e4e6f3..2c51b3d 100644 (file)
@@ -165,8 +165,11 @@ public abstract class GStructureChooser extends JPanel implements
       {
         e.printStackTrace();
       }
-      toolTipText = (toolTipText == null ? null : JvSwingUtils.wrapTooltip(
-              true, toolTipText));
+      toolTipText = (toolTipText == null ? null
+              : (toolTipText.length() > 500 ? JvSwingUtils.wrapTooltip(
+                      true, "\"" + toolTipText.subSequence(0, 500)
+                              + "...\"") : JvSwingUtils.wrapTooltip(true,
+                      toolTipText)));
       return toolTipText;
     }
   };
@@ -324,11 +327,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 +340,7 @@ public abstract class GStructureChooser extends JPanel implements
         if (sourceTabbedPane.getTitleAt(index)
                 .equals(foundStructureSummary))
         {
+          btn_cancel.setEnabled(true);
           if (wantedFieldsUpdated())
           {
             tabRefresh();