Skip to content
Snippets Groups Projects
Commit 2976b63b authored by Mark Winter's avatar Mark Winter
Browse files

Search for locked trees first.

parent 8f5aa594
No related branches found
No related tags found
No related merge requests found
...@@ -26,6 +26,24 @@ ...@@ -26,6 +26,24 @@
function FindLargestTree(src,evnt) function FindLargestTree(src,evnt)
global CellFamilies Figures global CellFamilies Figures
if ( isfield(CellFamilies, 'bLocked') )
lockedTrees = find([CellFamilies.bLocked] ~= 0);
if ( ~isempty(lockedTrees) )
maxLockedTree = lockedTrees(1);
for i=2:length(lockedTrees)
if ( length(CellFamilies(maxLockedTree).tracks) < length(CellFamilies(lockedTrees(i)).tracks) )
maxLockedTree = lockedTrees(i);
end
end
Figures.tree.familyID = maxLockedTree;
UI.DrawTree(maxLockedTree);
UI.DrawCells();
return;
end
end
maxID = 1; maxID = 1;
for i=2:length(CellFamilies) for i=2:length(CellFamilies)
if(length(CellFamilies(maxID).tracks) < length(CellFamilies(i).tracks)) if(length(CellFamilies(maxID).tracks) < length(CellFamilies(i).tracks))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment