in progress
[jalview.git] / forester / java / src / org / forester / archaeopteryx / ControlPanel.java
index 21c4891..b58411b 100644 (file)
@@ -252,6 +252,12 @@ final class ControlPanel extends JPanel implements ActionListener {
                     }
                     PhylogenyMethods.orderAppearance( tp.getPhylogeny().getRoot(), _order_of_appearance, true, pri );
                     _order_of_appearance = !_order_of_appearance;
+                    tp.setNodeInPreorderToNull();
+                    tp.getPhylogeny().externalNodesHaveChanged();
+                    tp.getPhylogeny().hashIDs();
+                    tp.getPhylogeny().recalculateNumberOfExternalDescendants( true );
+                    tp.resetNodeIdToDistToLeafMap();
+                    tp.setEdited( true );
                     displayedPhylogenyMightHaveChanged( false );
                 }
                 else if ( e.getSource() == _uncollapse_all ) {
@@ -1156,9 +1162,7 @@ final class ControlPanel extends JPanel implements ActionListener {
             setActionWhenNodeClicked( NodeClickAction.SORT_DESCENDENTS );
         }
         else if ( action == _blast_item ) {
-            if ( !Constants.__RELEASE && !Constants.__SNAPSHOT_RELEASE ) {
-                setActionWhenNodeClicked( NodeClickAction.BLAST );
-            }
+            setActionWhenNodeClicked( NodeClickAction.BLAST );
         }
         else if ( action == _open_tax_web_item ) {
             setActionWhenNodeClicked( NodeClickAction.OPEN_TAX_WEB );
@@ -1362,6 +1366,14 @@ final class ControlPanel extends JPanel implements ActionListener {
             }
             cb_index++;
         }
+        if ( _configuration.doDisplayClickToOption( Configuration.blast ) ) {
+            _blast_item = cb_index;
+            addClickToOption( Configuration.blast, _configuration.getClickToTitle( Configuration.blast ) );
+            if ( default_option == Configuration.blast ) {
+                selected_index = cb_index;
+            }
+            cb_index++;
+        }
         if ( getOptions().isEditable() ) {
             if ( _configuration.doDisplayClickToOption( Configuration.cut_subtree ) ) {
                 _cut_subtree_item = cb_index;
@@ -1416,16 +1428,6 @@ final class ControlPanel extends JPanel implements ActionListener {
                 }
                 cb_index++;
             }
-            if ( !Constants.__RELEASE && !Constants.__SNAPSHOT_RELEASE ) {
-                if ( _configuration.doDisplayClickToOption( Configuration.blast ) ) {
-                    _blast_item = cb_index;
-                    addClickToOption( Configuration.blast, _configuration.getClickToTitle( Configuration.blast ) );
-                    if ( default_option == Configuration.blast ) {
-                        selected_index = cb_index;
-                    }
-                    cb_index++;
-                }
-            }
         }
         // Set default selection and its action
         _click_to_combobox.setSelectedIndex( selected_index );
@@ -1713,7 +1715,8 @@ final class ControlPanel extends JPanel implements ActionListener {
         if ( _mainpanel.getCurrentScrollPane() == null ) {
             return;
         }
-        displayedPhylogenyMightHaveChanged( false );
+        getCurrentTreePanel().updateSetOfCollapsedExternalNodes();
+        displayedPhylogenyMightHaveChanged( true );
         _mainpanel.getCurrentTreePanel().updateOvSettings();
         _mainpanel.getCurrentTreePanel().validate();
         _mainpanel.validate();
@@ -1813,7 +1816,7 @@ final class ControlPanel extends JPanel implements ActionListener {
                 node.setCollapse( false );
             }
             tp.resetNodeIdToDistToLeafMap();
-            tp.updateSetOfCollapsedExternalNodes( t );
+            tp.updateSetOfCollapsedExternalNodes();
             t.recalculateNumberOfExternalDescendants( false );
             tp.setNodeInPreorderToNull();
             t.hashIDs();