Commit 5630e652 authored by Markus Mueller-Trapet's avatar Markus Mueller-Trapet

bugfix for handleMode

parent 44fa4032
......@@ -88,8 +88,10 @@ if handleMode && ~meshOnly
% h = unvFilename;
if isfield(get(h),'FaceVertexCData')
nodeIDs = get(h,'UserData');
elseif isfield(get(h),'Children') && isfield(get(h,'Children'),'FaceVertexCData')
elseif isfield(get(h),'Children') && isfield(get(get(h,'Children')),'FaceVertexCData')
nodeIDs = get(get(h,'Children'),'UserData');
else
error('Could not find meta data, was this a mesh plot before?');
end
else
nodes = Mesh.nodesForElement(Mesh.shellElements);
......@@ -146,7 +148,7 @@ end
if handleMode
if isfield(get(h),'FaceVertexCData')
set(h,'FaceVertexCData',plotData);
elseif isfield(get(h),'Children') && isfield(get(h,'Children'),'FaceVertexCData')
elseif isfield(get(h),'Children') && isfield(get(get(h,'Children')),'FaceVertexCData')
set(get(h,'Children'),'FaceVertexCData',plotData);
end
else
......@@ -167,7 +169,6 @@ else
end
%% set title
if meshOnly
title('Mesh plot');
set(h,'EdgeAlpha',edgeAlpha,'EdgeColor',edgeColor,'FaceColor',faceColor);
......@@ -195,7 +196,6 @@ axis equal;
axis off;
%% Return the handle
varargout(1) = {h};
%end function
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment