Changeset 1200 for trunk/src/mouse_up.m


Ignore:
Timestamp:
Mar 20, 2026, 4:42:36 PM (22 hours ago)
Author:
sommeria
Message:

bug repaired for civ image rescale

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/mouse_up.m

    r1180 r1200  
    151151                    else
    152152                        hhview_field=guidata(hview_field);
    153                         [PlotType,PlotParam]=plot_field(ProjData,hhview_field.PlotAxes,read_GUI(hview_field));%update an existing  plot in view_field
     153                        [~,PlotParam]=plot_field(ProjData,hhview_field.PlotAxes,read_GUI(hview_field));%update an existing  plot in view_field
    154154                        errormsg=fill_GUI(PlotParam,hview_field);
    155155                    end
     
    168168                else
    169169                    UvData.PlotAxes=ProjData;
    170                     [PlotType,PlotParam]=plot_field(ProjData,hhuvmat.PlotAxes,read_GUI(huvmat));%update an existing field plot
     170                    [~,PlotParam]=plot_field(ProjData,hhuvmat.PlotAxes,read_GUI(huvmat));%update an existing field plot
    171171                    errormsg=fill_GUI(PlotParam,huvmat);
    172172                end
     
    201201
    202202%% creation or update of a  zoom sub-plot
    203 if CheckZoomFig && isequal(get(hcurrentfig,'SelectionType'),'normal')&&...%if left button has been pressed
     203CheckZoomFigActivate=CheckZoomFig && strcmp(get(hcurrentfig,'SelectionType'),'normal')&&...%if left button has been pressed
    204204     ~isempty(CurrentOrigin) && ~isequal(CurrentOrigin(1),xy(1,1)) && ~isequal(CurrentOrigin(2),xy(1,2))%if mouse moved in x and y since presed down
     205if CheckZoomFigActivate
    205206    hparentfig=hcurrentfig;
    206207    %open or update a new zoom figure if a rectangle has been drawn
    207208    if ishandle(hcurrentaxes)
    208209        if isfield(AxeData,'CurrentRectZoom') && ~isempty(AxeData.CurrentRectZoom) && ishandle(AxeData.CurrentRectZoom)
    209             %PosRect=get(AxeData.CurrentRectZoom,'Position');
    210210            if isfield(AxeData,'CurrentVec') && ~isempty(AxeData.CurrentVec) && ishandle(AxeData.CurrentVec)
    211211                delete(AxeData.CurrentVec)
     
    391391%------------------------------------------------------------------------
    392392function close_fig(ggg,eventdata,hparent)
    393 
    394 hfig=get(get(hparent,'parent'),'parent');
    395 hbutton=findobj(hfig,'Tag','CheckZoomFig');
    396 if ~isempty(hbutton)
    397     set(hbutton,'Value',0)% desactivate the zoom fig option
    398 end
    399 delete(hparent)  % delete the rectangle showing the zoom graph in the parent fig
    400 
     393if isvalid(hparent)
     394    figparent=get(hparent,'parent');
     395    if ~isempty(figparent)
     396        hfig=get(figparent,'parent');
     397        hbutton=findobj(hfig,'Tag','CheckZoomFig');
     398        if ~isempty(hbutton)
     399            set(hbutton,'Value',0)% desactivate the zoom fig option
     400        end
     401        delete(hparent)  % delete the rectangle showing the zoom graph in the parent fig
     402    end
     403end
Note: See TracChangeset for help on using the changeset viewer.