Changeset 625 for trunk/src/uvmat.m
- Timestamp:
- May 2, 2013, 7:51:42 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/uvmat.m
r623 r625 2551 2551 UvData.ProjObject{1}.Type='plane';%main plotting plane 2552 2552 UvData.ProjObject{1}.ProjMode='projection';%main plotting plane 2553 UvData.ProjObject{1}.Coord=[0 0 0]; 2553 2554 UvData.ProjObject{1}.DisplayHandle.uvmat=[]; %plane not visible in uvmat 2554 2555 UvData.ProjObject{1}.DisplayHandle.view_field=[]; %plane not visible in uvmat … … 4168 4169 list_str=get(handles.ListObject,'String'); 4169 4170 IndexObj=get(handles.ListObject,'Value');%present object selection 4170 4171 %% The object is displayed in set_object if this GUI is already opened4172 4171 UvData=get(handles.uvmat,'UserData'); 4173 4172 ObjectData=UvData.ProjObject{IndexObj}; 4174 hset_object=findobj(allchild(0),'tag','set_object');4175 if ~isempty(hset_object)4176 4173 ZBounds=0; % default 4177 4174 if isfield(UvData.Field,'ZMin') && isfield(UvData.Field,'ZMax') … … 4179 4176 ZBounds(2)=UvData.Field.ZMax;%maximum for the Z slider 4180 4177 end 4181 ObjectData.Name=list_str{IndexObj}; 4178 4179 %% show object features if view_object isselected 4180 if get(handles.ViewObject,'value') 4182 4181 set_object(ObjectData,[],ZBounds); 4183 set(handles.ViewField,'Value',1)% show that the selected object in ListObject is currently visualised 4184 end 4185 4186 %% desactivate the edit object mode 4182 end 4183 4184 %% The object is displayed in set_object if this GUI is already opened 4185 % 4186 % hset_object=findobj(allchild(0),'tag','set_object'); 4187 % if ~isempty(hset_object) 4188 % 4189 % ObjectData.Name=list_str{IndexObj}; 4190 % set_object(ObjectData,[],ZBounds); 4191 % set(handles.ViewField,'Value',1)% show that the selected object in ListObject is currently visualised 4192 % end 4193 4194 %% desactivate the edit object mode for security 4187 4195 set(handles.edit_object,'Value',0) 4196 4188 4197 % set(handles.edit_object,'BackgroundColor',[0.7,0.7,0.7]) 4189 4198 … … 4274 4283 %------------------------------------------------------------------- 4275 4284 hset_object=findobj(allchild(0),'Tag','set_object'); 4276 if get(handles.edit_object,'Value') 4277 % set(handles.edit_object,'BackgroundColor',[1,1,0]) 4285 if get(handles.edit_object,'Value') 4278 4286 %suppress the other options 4279 4287 set(handles.CheckZoom,'Value',0) … … 4283 4291 hhgeometry_calib=guidata(hgeometry_calib); 4284 4292 set(hhgeometry_calib.edit_append,'Value',0)% desactivate mouse action in geometry_calib 4285 set(hhgeometry_calib.edit_append,'BackgroundColor',[0.7 0.7 0.7])4286 4293 end 4287 4294 set(handles.ViewObject,'value',1) 4288 4295 ViewObject_Callback(hObject, eventdata, handles) 4289 else % desctivate object edit mode 4290 % set(handles.edit_object,'BackgroundColor',[0.7,0.7,0.7]) 4296 else % desactivate object edit mode 4291 4297 if ~isempty(hset_object)% open the 4292 hhset_object=guidata(hset_object);4293 set(hhset_object.PLOT,'enable','off');4294 set( get(hset_object,'children'),'enable','inactive')4298 set(get(hset_object,'children'),'Enable','off') 4299 hSAVE=findobj(hset_object,'Tag','SAVE'); 4300 set(hSAVE,'Enable','on') 4295 4301 end 4296 4302 end … … 4317 4323 ZBounds(2)=UvData.Field.ZMax;%maximum for the Z slider 4318 4324 end 4319 % set(handles.ListObject_1,'Value',IndexObj);%restore ListObject selection after set_object deletion4320 4325 data=UvData.ProjObject{IndexObj}; 4321 4326 if ~isfield(data,'Type')% default plane 4322 4327 data.Type='plane'; 4323 4328 end 4324 % if isfield(UvData,'Field')4325 % Field=UvData.Field;4326 % if isfield(UvData.Field,'Mesh')&&~isempty(UvData.Field.Mesh)4327 % data.RangeX=[UvData.Field.XMin UvData.Field.XMax];4328 % if strcmp(data.Type,'line')||strcmp(data.Type,'polyline')4329 % data.RangeY=UvData.Field.Mesh;4330 % else4331 % data.RangeY=[UvData.Field.YMin UvData.Field.YMax];4332 % end4333 % data.DX=UvData.Field.Mesh;4334 % data.DY=UvData.Field.Mesh;4335 % end4336 % if isfield(Field,'NbDim')&& isequal(Field.NbDim,3)4337 % data.Coord=[0 0 0]; %default4338 % end4339 % if isfield(Field,'CoordUnit')4340 % data.CoordUnit=Field.CoordUnit;4341 % end4342 % end4343 4329 hset_object=set_object(data,[],ZBounds); 4344 4330 hhset_object=guidata(hset_object); 4345 4331 if get(handles.edit_object,'Value')% edit mode 4346 set(hhset_object.PLOT,'Enable','on') 4347 set(get(hset_object,'children'),'enable','on') 4332 set(get(hset_object,'children'),'Enable','on') 4348 4333 else 4349 set(hhset_object.PLOT,'Enable','off') 4350 set(get(hset_object,'children'),'enable','inactive')% deactivate the GUI except SAVE 4334 set(get(hset_object,'children'),'Enable','off')% deactivate the GUI except SAVE 4351 4335 set(hhset_object.SAVE,'Enable','on') 4352 4336 end … … 4771 4755 end 4772 4756 set(handles.edit_object,'Value',0) %desactivate the object edit mode 4757 edit_object_Callback([],[],handles) 4758 set(handles.ViewObject,'Value',0) % desactivate view_object (new object created) 4773 4759 set(handles.CheckZoomFig,'Value',0) %desactivate zoom sub fig 4774 4760 set(handles.CheckZoom,'Value',0) %desactivate the zoom action … … 4777 4763 end 4778 4764 4779 %% append a new line to the list of projection objects 4780 ListObject=get(handles.ListObject,'String');4781 if isempty(ListObject)4782 ListObject={''};4783 end4784 if ~strcmp(ListObject{end},'')4785 ListObject=[ListObject;{''}]; %append a blank to the list (if nort already done) to indicate the creation of a new object4786 set(handles.ListObject,'String',ListObject)4787 end4788 IndexObj=length(ListObject);4789 set(handles.ListObject,'Value',IndexObj)4765 %% append a new line to the list of projection objects A METTRE PLUS TARD 4766 % ListObject=get(handles.ListObject,'String'); 4767 % if isempty(ListObject) 4768 % ListObject={''}; 4769 % end 4770 % if ~strcmp(ListObject{end},'') 4771 % ListObject=[ListObject;{''}]; %append a blank to the list (if nort already done) to indicate the creation of a new object 4772 % set(handles.ListObject,'String',ListObject) 4773 % end 4774 % IndexObj=length(ListObject); 4775 % set(handles.ListObject,'Value',IndexObj) 4790 4776 UvData=get(handles.uvmat,'UserData'); 4791 UvData.ProjObject{IndexObj}=[]; %create a new empty object4792 UvData.ProjObject{IndexObj}.DisplayHandle.uvmat=handles.PlotAxes; % axes for plot_object4793 UvData.ProjObject{IndexObj}.DisplayHandle.view_field=[]; %no plot handle before plot_field operation4794 set(handles.uvmat,'UserData',UvData)4777 % UvData.ProjObject{IndexObj}=[]; %create a new empty object 4778 % UvData.ProjObject{IndexObj}.DisplayHandle.uvmat=handles.PlotAxes; % axes for plot_object 4779 % UvData.ProjObject{IndexObj}.DisplayHandle.view_field=[]; %no plot handle before plot_field operation 4780 % set(handles.uvmat,'UserData',UvData) 4795 4781 4796 4782 %% initiate the new projection object … … 4862 4848 set(get(hset_object,'children'),'enable','on')% enable edit action on elements on GUI set_object 4863 4849 set(handles.edit_object,'Value',0); %suppress the object edit mode 4850 edit_object_Callback([],[],handles) 4864 4851 % set(handles.edit_object,'BackgroundColor',[0.7,0.7,0.7]) 4865 4852 set(handles.delete_object,'Visible','on')
Note: See TracChangeset
for help on using the changeset viewer.