diff --git a/tsgqc.m b/tsgqc.m index 8e935e249edb215498e291fa1df87af17eeb30cb..43c4a1d33c6578aef574103ed9c223e4f72f81b2 100644 --- a/tsgqc.m +++ b/tsgqc.m @@ -38,9 +38,9 @@ global GOSUD_FORMAT_VERSION % version number, may be used to initialize some files when it change % 0.90x -> 1.0RCx % ------------------------------------------------------------------- -VERSION = 1.481; % -> 1.44 -CHAR_VERSION = '1.48.1'; -DATE_VERSION = '29/05/2018'; +VERSION = 1.482; % -> 1.44 +CHAR_VERSION = '1.48.2'; +DATE_VERSION = '18/06/2018'; % netcdf file version, see DATA FORMAT TSG document: % CORTSG_format_gosud.doc @@ -1333,7 +1333,7 @@ hrbInterpCancel = uicontrol( ... % update the filename display % --------------------------- - set( hInfoFileText, 'String', strcat(tsg.file.name, tsg.file.ext)); + set( hInfoFileText, 'String', fileName); % The callback to detect the mouse motion can be set to on % -------------------------------------------------------- @@ -2128,9 +2128,9 @@ hrbInterpCancel = uicontrol( ... % Selection of the data within the figure % --------------------------------------- - point1 = get(gca,'CurrentPoint'); % button down detected - finalRect = rbbox; % return figure units - point2 = get(gca,'CurrentPoint'); % button up detected + point1 = get(gcbo,'CurrentPoint'); % button down detected + rbbox; % Create rubberband box for area selection + point2 = get(gcbo,'CurrentPoint'); % button up detected point1 = point1(1,1:2); % extract x and y point2 = point2(1,1:2); @@ -2138,6 +2138,14 @@ hrbInterpCancel = uicontrol( ... p1 = min(point1,point2); p2 = max(point1,point2); % calculate locations + if p1 == p2 + %disp('p1 == p2'); + return + end + +% fprintf(1, 'p1: %f %f size = %d\n', p1, length(p1)); +% fprintf(1, 'p2: %f %f size = %d\n', p2, length(p2)); + % The following code is only executed if the left mouse button is clicked. % If the right mouse button is clicked, this code must not be % executed as the variable 'ind' will be emptied. And this variable @@ -3553,7 +3561,7 @@ hrbInterpCancel = uicontrol( ... % update the display % ------------------ - set( hInfoFileText, 'String', strcat(tsg.file.name, tsg.file.ext)); + set( hInfoFileText, 'String', fileName); % enable Quality Control mode % ---------------------------