MATLAB Answers

AnnotationPane handle appearing in GUIDE GUIs with Panel-Axes in r2019b

50 views (last 30 days)
Adam Danz
Adam Danz on 27 Sep 2019
Edited: Adam Danz on 26 Dec 2019
I recently started using the r2019b release and noticed that an additional hidden handle is included in GUIs created in GUIDE if the GUI contains axes that are children of a UI panel. The handle is "handles.scribeOverlay" which is an annotationPane object (matlab.graphics.shape.internal.AnnotationPane).
Tested in both r2019a and r2019b, I've noticed that the handle appears when....
Opened in: r2019a r2019b
Created in: r2019a No Yes
Created in: r2019b Yes Yes
These annotationPane objects also cause error dialogs to appear when changing certain properties from within GUIDE which prevents the user from editing their GUI.
To demonstrate (if you're interested), attached are two simple, nearly identical GUIDE-GUIs (figures & m-files), one of which was created in r2019a and the other in r2019b (see filenames). They mereley contain a UI panel and an embedded axis. The opening functions print a list of all handles in the 'handles' structure, even the hidden object handles, to the command window. If these GUIs are run in r2019b, both will show that the scribeOverlay is present but if run in 2019a, only the "r2019b" version will show this handle.
Editing some of the properties in GUIDE from r2019b will cause an error.

  2 Comments

Adam Danz
Adam Danz on 4 Oct 2019
Note, in the following post, a user shared her GUIDE GUI files (link below). When I opened the GUIDE figure in r2019b and tried to change the Visible propery of the GUI figure from the properties inspector window, an error appeared preventing me from making the change. The error pertained to the AnnotationPane handle. A screenshot of the error is included in the link below. That same process in r2019a did not result in an error.
This problem can be reproduced using the attachments in my question above by following these steps.
  1. From r2019b, open the PanelAxesGUI_demo in GUIDE
  2. Right click the Panel and select property inspector
  3. Change the "Visible" property to "off" which results in the error below.
  4. Now, from r2019a, open the PanelAxesGUI_demo_r2019a in GUIDE
  5. Follow steps 2 & 3 above; this time, no error.
191004 163024-GUIDE.png

Sign in to comment.

Accepted Answer

Adam Danz
Adam Danz on 11 Oct 2019
Edited: Adam Danz on 26 Dec 2019
Solution to editing the GUI in GUIDE
When changing some properties of the GUI in GUIDE, an error dialog will appear preventing the user from making any changes. Add this file to your Matlab path to patch that problem.
[Update 26-Dec-2019]: Update #3 for r2019b fixes this problem above: https://www.mathworks.com/support/bugreports/2083859
Solution to removing annotationPane objects when opening the GUI
If the annotationPane objects are causing problem when opening or running your GUI, remove scribeOverlay handles within the GUI's openingFcn function prior to the guidata() command.
function myGUI_OpeningFcn(hObject, eventdata, handles, varargin)
% Choose default command line output for PanelAxesGUI_demo
handles.output = hObject;
% **************** ADD THIS SECTION ******************
% Check if scribeOverlay is a field and that it contains an annotation pane
if isfield(handles,'scribeOverlay') && isa(handles.scribeOverlay(1),'matlab.graphics.shape.internal.AnnotationPane')
delete(handles.scribeOverlay);
handles = rmfield(handles, 'scribeOverlay');
end
% ********************** END ************************
% Update handles structure
guidata(hObject, handles);
GUIDE GUIs are being discontinued so it's unclear whether these problems will be patched by TMW. This bug has been reported (Case Number 03816788).

  0 Comments

Sign in to comment.

More Answers (0)


Translated by