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

bugfix for handleMode

parent 44fa4032
...@@ -88,8 +88,10 @@ if handleMode && ~meshOnly ...@@ -88,8 +88,10 @@ if handleMode && ~meshOnly
% h = unvFilename; % h = unvFilename;
if isfield(get(h),'FaceVertexCData') if isfield(get(h),'FaceVertexCData')
nodeIDs = get(h,'UserData'); 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'); nodeIDs = get(get(h,'Children'),'UserData');
else
error('Could not find meta data, was this a mesh plot before?');
end end
else else
nodes = Mesh.nodesForElement(Mesh.shellElements); nodes = Mesh.nodesForElement(Mesh.shellElements);
...@@ -146,7 +148,7 @@ end ...@@ -146,7 +148,7 @@ end
if handleMode if handleMode
if isfield(get(h),'FaceVertexCData') if isfield(get(h),'FaceVertexCData')
set(h,'FaceVertexCData',plotData); 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); set(get(h,'Children'),'FaceVertexCData',plotData);
end end
else else
...@@ -167,7 +169,6 @@ else ...@@ -167,7 +169,6 @@ else
end end
%% set title %% set title
if meshOnly if meshOnly
title('Mesh plot'); title('Mesh plot');
set(h,'EdgeAlpha',edgeAlpha,'EdgeColor',edgeColor,'FaceColor',faceColor); set(h,'EdgeAlpha',edgeAlpha,'EdgeColor',edgeColor,'FaceColor',faceColor);
...@@ -195,7 +196,6 @@ axis equal; ...@@ -195,7 +196,6 @@ axis equal;
axis off; axis off;
%% Return the handle %% Return the handle
varargout(1) = {h}; varargout(1) = {h};
%end function %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