From 2f0a0ebeed136b64dba2286abd72c1ff3e055d91 Mon Sep 17 00:00:00 2001 From: cmzmasek Date: Wed, 30 Jul 2014 21:22:08 +0000 Subject: [PATCH] in progress --- forester/java/src/org/forester/archaeopteryx/MainFrame.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/forester/java/src/org/forester/archaeopteryx/MainFrame.java b/forester/java/src/org/forester/archaeopteryx/MainFrame.java index 28d0ae3..e89f978 100644 --- a/forester/java/src/org/forester/archaeopteryx/MainFrame.java +++ b/forester/java/src/org/forester/archaeopteryx/MainFrame.java @@ -548,10 +548,16 @@ public abstract class MainFrame extends JFrame implements ActionListener { if ( phy == null || phy.getNumberOfExternalNodes() < 2 ) { return; } - List nodes = null; + List nodes = new ArrayList(); if ( ( getCurrentTreePanel().getFoundNodes0() != null ) || ( getCurrentTreePanel().getFoundNodes1() != null ) ) { - nodes = getCurrentTreePanel().getFoundNodesAsListOfPhylogenyNodes(); + final List all_selected_nodes = getCurrentTreePanel().getFoundNodesAsListOfPhylogenyNodes(); + for( final PhylogenyNode n : all_selected_nodes ) { + if ( n.isExternal() ) { + nodes.add( n ); + } + } } + String function = "Retain"; if ( delete ) { function = "Delete"; -- 1.7.10.2