Skip to content
Snippets Groups Projects
Commit b9336f13 authored by Nathan Spaeth's avatar Nathan Spaeth
Browse files

Fix file open bugs.

parent e70df2e6
Branches
Tags
No related merge requests found
......@@ -19,6 +19,7 @@ while ( ~bOpened )
[sigDigits imageDataset] = Helper.ParseImageName(settings.imageFile);
<<<<<<< Updated upstream
if (~isfield(CONSTANTS,'datasetName'))
CONSTANTS.datasetName = imageDataset;
elseif (~strcmp(imageDataset,CONSTANTS.datasetName))
......@@ -36,6 +37,23 @@ while ( ~bOpened )
otherwise
continue;
end
=======
if (strcmp(imageDataset,[CONSTANTS.datasetName '_']))
CONSTANTS.datasetName = [CONSTANTS.datasetName '_'];
bOpened = 1;
elseif (~strcmp(imageDataset,CONSTANTS.datasetName))
answer = questdlg('Image does not match dataset would you like to choose another?','Image Selection','Yes','No','Close LEVer','Yes');
switch answer
case 'Yes'
continue;
case 'No'
CONSTANTS.imageNamePattern = '';
bOpened = 1;
case 'Close LEVer'
return
otherwise
continue;
>>>>>>> Stashed changes
end
end
......
......@@ -54,6 +54,7 @@ if (exist('LEVerSettings.mat','file'))
else
settings.imagePath = '.\';
settings.matFilePath = '.\';
settings.matFile = '*.mat';
end
if (~isfield(settings,'matFilePath'))
......@@ -135,6 +136,7 @@ switch answer
save('LEVerSettings.mat','settings');
Load.InitializeConstants();
CONSTANTS.matFullFile = [settings.matFilePath settings.matFile];
if (~isfield(CONSTANTS,'imageNamePattern') || exist(Helper.GetFullImagePath(1),'file')~=2)
......
......@@ -29,15 +29,17 @@ global Figures softwareVersion
%if LEVer is already opened, save state just in case the User cancels the
%open
previousOpened = 0;
if(~isempty(Figures))
Editor.History('Push');
previousOpened = 1;
end
softwareVersion = '7.0 Multi-Cell';
if(Load.OpenData())
Editor.ReplayableEditAction(@Editor.InitHistory);
else
elseif(previousOpened)
try
Editor.History('Top');
UI.InitializeFigures();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment