time | Calls | line |
---|
| | 1 | function markFigure(objs)
|
| | 2 | %markFigure Mark an editor figure as changed
|
| | 3 |
|
| | 4 | % Copyright 2015-2017 The MathWorks, Inc.
|
| | 5 |
|
0.005 | 72 | 6 | for obj = objs(:)'
|
< 0.001 | 72 | 7 | if isgraphics(obj)
|
0.004 | 72 | 8 | fig = ancestor(obj,'figure');
|
0.002 | 72 | 9 | if ~isempty(fig) && isappdata(fig, 'EDITOR_APPDATA')
|
| | 10 | % toggling Color to mark the figure as changed
|
| | 11 | color = get(fig,'Color');
|
| | 12 | if isnumeric(color)
|
| | 13 | newcolor = 1-color;
|
| | 14 | if isequal(color, newcolor)
|
| | 15 | newcolor = [0 0 0];
|
| | 16 | end
|
| | 17 | else % Figure color can be 'none'
|
| | 18 | newcolor = [0 0 0];
|
| | 19 | end
|
| | 20 | set(fig,'Color',newcolor);
|
| | 21 | set(fig,'Color',color);
|
< 0.001 | 72 | 22 | end
|
< 0.001 | 72 | 23 | end
|
< 0.001 | 72 | 24 | end
|