diff --git a/functions/utilities/exportFigureGUI.m b/functions/utilities/exportFigureGUI.m index accb4eb6bfe491ba2e2d39a78c3e6503c1282d7f..2c68d55aef190c357381d5a7e51f0e69280730c4 100644 --- a/functions/utilities/exportFigureGUI.m +++ b/functions/utilities/exportFigureGUI.m @@ -178,7 +178,7 @@ previewButton = uibutton(fig, 'Text', 'Update preview', ... obj = findall(selectedFig, 'Type', 'figure'); % Delete any existing axes - delete(findall(uiPanel, 'Type', 'figure')); + delete(findall(uiPanel, 'Type', 'axes')); % Copy the axes into the UI Panel newAx = copyobj(obj.Children, uiPanel);