Skip to content
Snippets Groups Projects
Commit e81cd540 authored by leprob001's avatar leprob001
Browse files

Bugfix, if the syncZoomToaWindow checkbox is unchecked, the TOA window limits get reset.

parent e972fa29
No related branches found
No related tags found
No related merge requests found
...@@ -2,9 +2,20 @@ function [] = checkboxSyncZoomToaWindow(~, event) ...@@ -2,9 +2,20 @@ function [] = checkboxSyncZoomToaWindow(~, event)
%CHECKBOXSYNCZOOMTOAWINDOW Summary of this function goes here %CHECKBOXSYNCZOOMTOAWINDOW Summary of this function goes here
% Detailed explanation goes here % Detailed explanation goes here
global artoaWorkspace; global artoaWorkspace artoaGui;
artoaWorkspace.trajectoryOutput.syncZoomToaWindow = logical(event.Source.Value); artoaWorkspace.trajectoryOutput.syncZoomToaWindow = logical(event.Source.Value);
if ~artoaWorkspace.trajectoryOutput.syncZoomToaWindow ...
&& artoa.data.hasMember(artoaGui, {'editTimeOfArrival', 'axesScatterTimeOfArrival'}) ...
&& ishandle(artoaGui.editTimeOfArrival.axesScatterTimeOfArrival)
artoaGui.editTimeOfArrival.axesScatterTimeOfArrival.XLim = ...
[ ...
min(artoaWorkspace.toaData.toaDate(artoaWorkspace.toaData.status ~= 2)) ...
max(artoaWorkspace.toaData.toaDate(artoaWorkspace.toaData.status ~= 2)) ...
];
end
end end
...@@ -58,7 +58,11 @@ collectedDates = unique(collectedDates); ...@@ -58,7 +58,11 @@ collectedDates = unique(collectedDates);
maxDate = max(collectedDates); maxDate = max(collectedDates);
minDate = min(collectedDates); minDate = min(collectedDates);
if any(isnan(maxDate)) || any(isnan(minDate)) || isempty(minDate) || isempty(maxDate) if any(isnan(maxDate)) || any(isnan(minDate)) || isempty(minDate) || isempty(maxDate)
warning('Selected max or min date equals NaN or is empty, aborting synchronization...'); artoaGui.editTimeOfArrival.axesScatterTimeOfArrival.XLim = ...
[ ...
min(artoaWorkspace.toaData.toaDate(artoaWorkspace.toaData.status ~= 2)) ...
max(artoaWorkspace.toaData.toaDate(artoaWorkspace.toaData.status ~= 2)) ...
];
return; return;
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment