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

Fixes to initialization order to allow FixOldFileVersions to run (and save)...

Fixes to initialization order to allow FixOldFileVersions to run (and save) before figure windows are initialized.
parent 2b4c611f
Branches
Tags
No related merge requests found
...@@ -28,6 +28,4 @@ function SaveLEVerState(filename) ...@@ -28,6 +28,4 @@ function SaveLEVerState(filename)
save(filename,'CellFamilies','CellHulls','CellTracks','HashedCells','Costs','GraphEdits','CONSTANTS',... save(filename,'CellFamilies','CellHulls','CellTracks','HashedCells','Costs','GraphEdits','CONSTANTS',...
'ConnectedDist','CellPhenotypes','Log','ReplayEditActions'); 'ConnectedDist','CellPhenotypes','Log','ReplayEditActions');
Editor.History('Saved');
end end
...@@ -163,8 +163,6 @@ switch answer ...@@ -163,8 +163,6 @@ switch answer
Load.InitializeConstants(); Load.InitializeConstants();
UI.InitializeFigures();
bUpdated = Load.FixOldFileVersions(); bUpdated = Load.FixOldFileVersions();
if ( bUpdated ) if ( bUpdated )
...@@ -172,6 +170,7 @@ switch answer ...@@ -172,6 +170,7 @@ switch answer
Helper.SaveLEVerState(CONSTANTS.matFullFile); Helper.SaveLEVerState(CONSTANTS.matFullFile);
end end
UI.InitializeFigures();
opened = 1; opened = 1;
otherwise otherwise
......
...@@ -119,8 +119,6 @@ Figures.tree.timeLabel = uicontrol(Figures.tree.handle,... ...@@ -119,8 +119,6 @@ Figures.tree.timeLabel = uicontrol(Figures.tree.handle,...
'Position',[1 0 60 20],... 'Position',[1 0 60 20],...
'String',['Time: ' num2str(Figures.time)]); 'String',['Time: ' num2str(Figures.time)]);
Families.FindLargestTree([],[]);
if(~isempty(oldCellsHandle) && ishandle(oldCellsHandle)) if(~isempty(oldCellsHandle) && ishandle(oldCellsHandle))
set(oldCellsHandle,'CloseRequestFcn','remove'); set(oldCellsHandle,'CloseRequestFcn','remove');
close(oldCellsHandle); close(oldCellsHandle);
...@@ -138,6 +136,8 @@ Figures.cells.learnButton = uicontrol(... ...@@ -138,6 +136,8 @@ Figures.cells.learnButton = uicontrol(...
'CallBack', @learnFromEdits); 'CallBack', @learnFromEdits);
Figures.cells.maxEditedFrame = length(HashedCells); Figures.cells.maxEditedFrame = length(HashedCells);
Families.FindLargestTree([],[]);
end end
%% Callback Functions %% Callback Functions
......
...@@ -49,6 +49,8 @@ else ...@@ -49,6 +49,8 @@ else
end end
end end
Editor.History('Saved');
%let the user know that the drawing is done %let the user know that the drawing is done
if(isfield(Figures,'tree') && isfield(Figures.tree,'handle')) if(isfield(Figures,'tree') && isfield(Figures.tree,'handle'))
set(Figures.tree.handle,'Pointer','arrow'); set(Figures.tree.handle,'Pointer','arrow');
......
...@@ -45,6 +45,8 @@ end ...@@ -45,6 +45,8 @@ end
if (FilterIndex~=0) if (FilterIndex~=0)
CONSTANTS.matFullFile = [settings.matFilePath settings.matFile]; CONSTANTS.matFullFile = [settings.matFilePath settings.matFile];
Helper.SaveLEVerState(CONSTANTS.matFullFile); Helper.SaveLEVerState(CONSTANTS.matFullFile);
Editor.History('Saved');
else else
return return
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment