Mercurial > octave
changeset 22053:90eca9a9c47a
Call Fdrawnow only after ui* callbacks, not all (bug #47216).
* graphics.cc (gh_manager::do_execute_callback):
Check the name of graphics object starts "ui" before calling Fdrawnow.
author | Lachlan Andrew <lachlanbis@gmail.com> |
---|---|
date | Thu, 30 Jun 2016 18:23:34 +1000 |
parents | 3cbfbb920de3 |
children | 55e2979e1fd1 |
files | libinterp/corefcn/graphics.cc |
diffstat | 1 files changed, 15 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.cc Wed Jul 06 15:45:01 2016 -0700 +++ b/libinterp/corefcn/graphics.cc Thu Jun 30 18:23:34 2016 +1000 @@ -9551,10 +9551,23 @@ recover_from_exception (); } + // Redraw after interacting with a user-interface (ui*) object. if (Vdrawnow_requested) { - Fdrawnow (); - Vdrawnow_requested = false; + graphics_object go = get_object (h); + + if (go) + { + std::string go_name = go.get_properties () + .graphics_object_name (); + + if (go_name.length () > 1 + && go_name[0] == 'u' && go_name[1] == 'i') + { + Fdrawnow (); + Vdrawnow_requested = false; + } + } } } }