in progress
[jalview.git] / forester / java / src / org / forester / archaeopteryx / TreePanel.java
index b245183..befe375 100644 (file)
@@ -411,7 +411,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
         }
         setNodeInPreorderToNull();
         _phylogeny.externalNodesHaveChanged();
-        _phylogeny.hashIDs();
+        _phylogeny.clearHashIdToNodeMap();
         _phylogeny.recalculateNumberOfExternalDescendants( true );
         resetNodeIdToDistToLeafMap();
         setEdited( true );
@@ -882,7 +882,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
         setCopiedAndPastedNodes( null );
         setCutOrCopiedTree( _phylogeny.copy( node ) );
         _phylogeny.deleteSubtree( node, true );
-        _phylogeny.hashIDs();
+        _phylogeny.clearHashIdToNodeMap();
         _phylogeny.recalculateNumberOfExternalDescendants( true );
         resetNodeIdToDistToLeafMap();
         setEdited( true );
@@ -948,7 +948,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
             _phylogeny.deleteSubtree( node, true );
         }
         _phylogeny.externalNodesHaveChanged();
-        _phylogeny.hashIDs();
+        _phylogeny.clearHashIdToNodeMap();
         _phylogeny.recalculateNumberOfExternalDescendants( true );
         resetNodeIdToDistToLeafMap();
         setEdited( true );
@@ -3670,6 +3670,9 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                                final int graphics_file_height,
                                final int graphics_file_x,
                                final int graphics_file_y ) {
+        if ( ( _phylogeny == null ) || _phylogeny.isEmpty() ) {
+            return;
+        }
         if ( _control_panel.isShowSequenceRelations() ) {
             _query_sequence = _control_panel.getSelectedQuerySequence();
         }
@@ -4240,7 +4243,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
         getCopiedAndPastedNodes().addAll( node_ids );
         setNodeInPreorderToNull();
         _phylogeny.externalNodesHaveChanged();
-        _phylogeny.hashIDs();
+        _phylogeny.clearHashIdToNodeMap();
         _phylogeny.recalculateNumberOfExternalDescendants( true );
         resetNodeIdToDistToLeafMap();
         setEdited( true );
@@ -4543,7 +4546,9 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
             }
         }
         if ( getMainPanel().getOptions().isAntialiasScreen() ) {
-            if ( getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.RECTANGULAR ) {
+            if ( ( getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.RECTANGULAR )
+                    && !getMainPanel().getOptions().isShowDefaultNodeShapes()
+                    && ( ( getControlPanel() != null ) && !getControlPanel().isShowDomainArchitectures() ) ) {
                 _rendering_hints.put( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF );
             }
             else {
@@ -4951,7 +4956,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
             node.swapChildren();
             setNodeInPreorderToNull();
             _phylogeny.externalNodesHaveChanged();
-            _phylogeny.hashIDs();
+            _phylogeny.clearHashIdToNodeMap();
             _phylogeny.recalculateNumberOfExternalDescendants( true );
             resetNodeIdToDistToLeafMap();
             setEdited( true );
@@ -4975,7 +4980,7 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
             PhylogenyMethods.sortNodeDescendents( node, pri );
             setNodeInPreorderToNull();
             _phylogeny.externalNodesHaveChanged();
-            _phylogeny.hashIDs();
+            _phylogeny.clearHashIdToNodeMap();
             _phylogeny.recalculateNumberOfExternalDescendants( true );
             resetNodeIdToDistToLeafMap();
             setEdited( true );