Changeset 342 for trunk/src/set_object.m
- Timestamp:
- Dec 20, 2011, 5:14:43 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/set_object.m
r341 r342 672 672 hhuvmat=guidata(huvmat);%handles in the uvmat GUI 673 673 ListObject=get(hhuvmat.ListObject,'String');%position in the objet list 674 IndexObj=get(hhuvmat.ListObject,'Value') 674 IndexObj=get(hhuvmat.ListObject,'Value'); 675 675 676 676 %% read the object on the GUI set_object 677 ObjectData=read_set_object(handles);%read the input parameters defining the object in the GUI set_object 677 678 ObjectName=get(handles.TITLE,'String');%name of the current object defiend in set_object 678 ObjectData=read_set_object(handles);%read the input parameters defining the object in the GUI set_object679 679 if isempty(ObjectName) 680 680 if get(hhuvmat.edit_object,'Value')% edit mode 681 681 ObjectName=ListObject{IndexObj(end)};%take the name of the last (second) selected item 682 else %new object 683 StyleList=get(handles.ObjectStyle,'String'); 684 StyleVal=get(handles.ObjectStyle,'Value'); 685 ObjectName=StyleList{StyleVal}; 686 %ObjectName=[num2str(numel(ListObject)+1) '-' StyleList{StyleVal}];% take the object style as default name 682 687 end 683 688 end … … 700 705 end 701 706 ObjectName=ObjectNameNew; 702 ObjectName=[num2str(IndexObj(end)) '-' ObjectData.Style];%default name 707 % ObjectName=[num2str(IndexObj(end)) '-' ObjectData.Style];%default name 708 set(handles.TITLE,'String',ObjectName)% display the default name in set_object 709 IndexObj(2)=numel(ListObject)+1;% append an object to the list in uvmat 710 set(hhuvmat.ListObject,'String',[ListObject;{ObjectName}]);%complement the object list 711 set(hhuvmat.ListObject,'Value',IndexObj) 712 UvData.Object{IndexObj(2)}=[];%initiate a new object (empty yet) 703 713 end 704 714 % IndexObj_1=IndexObj(1);
Note: See TracChangeset
for help on using the changeset viewer.