octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #53513] Deleting an uicontextmenu object does


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #53513] Deleting an uicontextmenu object does not update uicontexmenu properties immediately
Date: Sat, 31 Oct 2020 07:37:10 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36 Edg/86.0.622.56

Update of bug #53513 (project octave):

                  Status:         Patch Submitted => Ready For Test         
        Operating System:               GNU/Linux => Any                    

    _______________________________________________________

Follow-up Comment #35:

I ran a script with the following commands in Matlab R2020b:

hf = figure();
cm = uicontextmenu(hf);
set(cm, 'DeleteFcn', @(h,e) disp(get(get(h, 'Parent'), 'UiContextMenu')));
set(hf, 'UiContextMenu', cm);

disp(get(hf, 'UiContextMenu'));

delete(cm);


The output is:

>> test_uicontextmenu_delete
  ContextMenu with properties:

    ContextMenuOpeningFcn: ''
                 Children: [0×0 GraphicsPlaceholder]

  Use get to show all properties

  0×0 empty GraphicsPlaceholder array.


So the "uicontextmenu" property of the figure is already cleared when the
"deletefcn" executes.

The order in the patch from comment #33 seems to match what Matlab does.

With the patch, I ran the BIST that previously failed intermittently 200 times
in a loop and it never failed for me.
So I pushed the patch to stable here:
https://hg.savannah.gnu.org/hgweb/octave/rev/df307ee1fb30

Wrt the second patch: I lost track of the different issues. Is this patch
meant to solve this bug or a different bug?
When you write "Some more work is needed.", does that mean we should not use
the patch? Or do you mean that we should use the patch, but it doesn't fix all
issues, and we'd need additional patches to fix all of them?


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?53513>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]