in progress
authorcmzmasek <cmzmasek@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Wed, 30 Jul 2014 21:22:08 +0000 (21:22 +0000)
committercmzmasek <cmzmasek@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Wed, 30 Jul 2014 21:22:08 +0000 (21:22 +0000)
forester/java/src/org/forester/archaeopteryx/MainFrame.java

index 28d0ae3..e89f978 100644 (file)
@@ -548,10 +548,16 @@ public abstract class MainFrame extends JFrame implements ActionListener {
         if ( phy == null || phy.getNumberOfExternalNodes() < 2 ) {\r
             return;\r
         }\r
-        List<PhylogenyNode> nodes = null;\r
+        List<PhylogenyNode> nodes = new ArrayList<PhylogenyNode>();\r
         if ( ( getCurrentTreePanel().getFoundNodes0() != null ) || ( getCurrentTreePanel().getFoundNodes1() != null ) ) {\r
-            nodes = getCurrentTreePanel().getFoundNodesAsListOfPhylogenyNodes();\r
+            final List<PhylogenyNode>  all_selected_nodes = getCurrentTreePanel().getFoundNodesAsListOfPhylogenyNodes();\r
+            for( final PhylogenyNode n : all_selected_nodes ) {\r
+                if ( n.isExternal() ) {\r
+                    nodes.add( n );\r
+                }\r
+            }\r
         }\r
+        \r
         String function = "Retain";\r
         if ( delete ) {\r
             function = "Delete";\r