JAL-4090 defensive check for featureSettings redraws when feature filter attrbute...
[jalview.git] / src / jalview / gui / FeatureSettings.java
index 0d6d371..4d31805 100644 (file)
@@ -411,6 +411,7 @@ public class FeatureSettings extends JPanel
     {
       frame = new JInternalFrame();
       frame.setContentPane(this);
+      frame.setFrameIcon(null);
       Rectangle bounds = af.getFeatureSettingsGeometry();
       String title;
       if (af.getAlignPanels().size() > 1 || Desktop.getAlignmentPanels(
@@ -950,7 +951,6 @@ public class FeatureSettings extends JPanel
     chooser.setResponseHandler(0, () -> {
       File file = chooser.getSelectedFile();
       load(file);
-      return null;
     });
     chooser.showOpenDialog(this);
   }
@@ -1019,7 +1019,7 @@ public class FeatureSettings extends JPanel
       }
     } catch (Exception ex)
     {
-      System.out.println("Error loading User Colour File\n" + ex);
+      jalview.bin.Console.outPrintln("Error loading User Colour File\n" + ex);
     }
   }
 
@@ -1608,7 +1608,7 @@ public class FeatureSettings extends JPanel
     {
       Color newColor = gcol.getMaxColour();
       comp.setBackground(newColor);
-      // System.err.println("Width is " + w / 2);
+      // jalview.bin.Console.errPrintln("Width is " + w / 2);
       Icon ficon = new FeatureIcon(gcol, comp.getBackground(), w, h, thr);
       comp.setIcon(ficon);
       // tt+="RGB value: Max (" + newColor.getRed() + ", "
@@ -1787,11 +1787,15 @@ public class FeatureSettings extends JPanel
     {
       FeatureMatcherSetI theFilter = (FeatureMatcherSetI) filter;
       setOpaque(true);
-      String asText = theFilter.toString();
       setBackground(tbl.getBackground());
-      this.setText(asText);
       this.setIcon(null);
 
+      if (theFilter != null)
+      {
+        String asText = theFilter.toString();
+        this.setText(asText);
+      }
+
       if (isSelected)
       {
         if (selectedBorder == null)