MATLAB Answers

Adam Danz
0

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

Asked by Adam Danz
on 27 Sep 2019
Latest activity Commented on by Adam Danz
on 18 Nov 2019 at 18:57
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
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.
My questions are, why is there an annotationPane suddenly appearing and what purpose does it serve? Turning its visibility on/off doesn't reveal any differences to the GUI.

  2 Comments

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.

Products


Release

R2019b

1 Answer

Answer by Adam Danz
on 11 Oct 2019
Edited by Adam Danz
on 11 Oct 2019

TMW is aware of this bug (Case Number 03816788)
To remove the AnnotationPanes and the scribeOverlay handle, add these lines to your GUI's opening 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);
Unfortunately this will not solve the error caused by editing certain properties of the annotation pane from within GUIDE. GUIDE GUIs are being discontinued so I doubt this will be fixed.

  0 Comments

Sign in to comment.