Ignore:
Timestamp:
Sep 2, 2013, 2:42:52 PM (11 years ago)
Author:
sommeria
Message:

mouse action improved for translations, use of magenta color to indicate that REFRESH is needed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/keyboard_callback.m

    r625 r681  
    44cur_axes=get(hObject,'CurrentAxes');%current plotting axes of the figure with handle hObject
    55xx=double(get(hObject,'CurrentCharacter')); %get the keyboard character
     6if ~isempty(xx)
    67switch xx
    78    case {29,28,30,31}    %arrows for displacement
     
    4445            end
    4546        end
    46     case {8, 127} %if the delete or suppr key is pressed, delete the current object
    47         currentobject=gco;
    48         huvmat=findobj(allchild(0),'tag','uvmat');
    49         hlist_object=findobj(huvmat,'Tag','list_object_1');
    50         ObjIndex=get(hlist_object,'Value');
    51         if ObjIndex>1
    52             delete_object(ObjIndex)
    53         end
    54         if ishandle(currentobject)
    55             tag=get(currentobject,'Tag');%tag of the current selected object
    56             if isequal(tag,'proj_object')
    57                 delete_object(currentobject)
    58             end
    59         end
     47%     case {8, 127} %if the delete or suppr key is pressed, delete the current object
     48%         currentobject=gco;
     49%         huvmat=findobj(allchild(0),'tag','uvmat');
     50%         hlist_object=findobj(huvmat,'Tag','list_object_1');
     51%         ObjIndex=get(hlist_object,'Value');
     52%         if ObjIndex>1
     53%             delete_object(ObjIndex)
     54%         end
     55%         if ishandle(currentobject)
     56%             tag=get(currentobject,'Tag');%tag of the current selected object
     57%             if isequal(tag,'proj_object')
     58%                 delete_object(currentobject)
     59%             end
     60%         end
    6061    case 112%  key 'p'
    6162        uvmat('runplus_Callback',hObject,eventdata,handleshaxes)
    6263    case 109%  key 'm'
    6364        uvmat('runmin_Callback',hObject,eventdata,handleshaxes)
     65    otherwise
     66        set(handleshaxes.run0,'BackgroundColor',[1 0 1])%indicat that Run must be activated (todo: rplace by REFRESH)
    6467end
    65 
     68end
Note: See TracChangeset for help on using the changeset viewer.