JAL-3390 redraw structures if alignment only and hidden regions change
[jalview.git] / src / jalview / structures / models / AAStructureBindingModel.java
index ef4fed3..d2fff3f 100644 (file)
@@ -819,10 +819,18 @@ public abstract class AAStructureBindingModel
     {
       return;
     }
-    // todo: property change event for visibleAlignment
-    // to avoid unnecessary redraws here
-    if (!colourBySequence && !isShowAlignmentOnly())
+
+    /*
+     * if structure is not coloured by sequence, but restricted to the alignment,
+     * then redraw it (but don't recolour it) in case hidden regions have changed
+     * (todo: specific messaging for change of hidden region only)
+     */
+    if (!colourBySequence)
     {
+      if (isShowAlignmentOnly())
+      {
+        showStructures(alignmentv.getAlignViewport(), false);
+      }
       return;
     }
     if (getSsm() == null)