File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -998,15 +998,19 @@ sub highlight_label_range_convex_hull_union {
998998
999999 my $cache = $bd ->get_cached_value_dor_set_default_href('LABEL_RANGE_CONVEX_HULL_VERTICES');
10001000
1001- my $hull_union = $cache ->{$node ->get_name};
1001+ # Cache on list of terminal names to avoid issues with trees
1002+ # that have similarly named nodes with different terminals.
1003+ my $cache_key = $node ->is_terminal_node ? $node ->get_name : $node ->get_terminal_element_names_sha256;
1004+
1005+ my $hull_union = $cache ->{$cache_key };
10021006 if (!$hull_union ) {
10031007 # could climb up the tree if this takes too long
10041008 foreach my $label (keys %$terminal_elements ) {
10051009 next LABEL if !exists $label_hash ->{$label };
10061010 my $hull = $bd ->get_label_range_convex_hull(label => $label );
10071011 $hull_union = $hull_union ? $hull_union ->Union ($hull ) : $hull ;
10081012 }
1009- $cache ->{$node ->get_name } = $hull_union ;
1013+ $cache ->{$cache_key } = $hull_union ;
10101014 }
10111015
10121016 # avoid plotting empties
You can’t perform that action at this time.
0 commit comments