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

Bugfix, dropping the selection was not correct in the new picking methods.

parent 8870d745
No related branches found
No related tags found
No related merge requests found
213
\ No newline at end of file
214
\ No newline at end of file
function [] = dropSelection()
function [result] = dropSelection()
%DROPSELECTION Summary of this function goes here
% Detailed explanation goes here
global artoaGui artoaWorkspace;
if ~islogical(artoaGui.editTimeOfArrival.currentInteractionMode)
return;
end
result = false;
if artoa.controller.edit.dataPointsSelected(artoaWorkspace.editTimeOfArrival)
if strcmp(questdlg('Reset current selection?', 'Confirmation', 'Yes', 'Cancel', 'Cancel'), 'Cancel')
......@@ -16,5 +14,7 @@ if artoa.controller.edit.dataPointsSelected(artoaWorkspace.editTimeOfArrival)
[artoaGui.editTimeOfArrival, artoaWorkspace.editTimeOfArrival] = artoa.controller.edit.clearSelection(artoaGui.editTimeOfArrival, artoaWorkspace.editTimeOfArrival);
end
result = true;
end
......@@ -18,12 +18,14 @@ if ~islogical(artoaGui.editTimeOfArrival.currentInteractionMode)
return;
end
%% Check if point is already selected
if ~artoa.controller.edit.timeOfArrival.dropSelection()
return;
end
%% Set mode to pickPoint
openPickPointMode();
%% Check if polygon is already selected
artoa.controller.edit.timeOfArrival.dropSelection();
%% Initialize variable
artoaGui.editTimeOfArrival.userSelection = {};
artoaWorkspace.editTimeOfArrival.userSelection = false(length(artoaWorkspace.toaData.toa), 1);
......
......@@ -22,12 +22,14 @@ if ~islogical(artoaGui.editTimeOfArrival.currentInteractionMode)
return;
end
%% Check if polygon is already selected
if ~artoa.controller.edit.timeOfArrival.dropSelection()
return;
end
%% Set mode to pickPoint
openPickPolygonMode();
%% Check if polygon is already selected
artoa.controller.edit.timeOfArrival.dropSelection();
%% Initialize variable
artoaGui.editTimeOfArrival.userSelection = {};
artoaWorkspace.editTimeOfArrival.userSelection = false(length(artoaWorkspace.toaData.toa), 1);
......
......@@ -17,7 +17,6 @@ artoaGui.figures.editTimeOfArrival = figure( ...
'KeyReleaseFcn', @artoa.controller.edit.timeOfArrival.onKeyUp, ...
'KeyPressFcn', @artoa.controller.edit.timeOfArrival.onKeyDown ...
);
addToolbarExplorationButtons(artoaGui.figures.editTimeOfArrival);
artoaGui.editTimeOfArrival = struct();
artoaGui.editTimeOfArrival.currentInteractionMode = false;
......
......@@ -16,7 +16,8 @@ availableCallbacks = { ...
'checkboxTrackVisible', ...
'tableGeneratedTracksSelect', ...
'checkboxShowPositionDates', ...
'checkboxSynchronizeZoomToaWindow' ...
'checkboxSynchronizeZoomToaWindow', ...
'checkboxUpdateTrackParameterWindow' ...
};
for i = 1:length(availableCallbacks) % check if a callback is undefined
......
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