Mercurial > octave
diff libinterp/corefcn/graphics.in.h @ 26520:278ae90567a7 stable
Don't use C++ callback to notify close request from Qt Figures (bug #54187)
* Figure.h/cc (Figure::close_figure_callback): Remove callback.
(Figure::eventNotifyBefore): Use gh_manager::post_callback rather than
octave_link::post_event to notify that a figure should be closed.
* graphics.in.h (graphics_event::create_mcode_event): New static function.
* graphics.cc (mcode_event): New class to handle direct mcode evaluation.
(gh_manager::do_post_callback): For "closerequestfcn" callback, create an
mcode_event and use the "close" function to make the figure current before
evaluating the actual closerequestfcn.
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Fri, 11 Jan 2019 18:14:41 +0100 |
parents | bf835b1d04b1 |
children | 8b0c9dc0799a 3c7c5b7c3044 |
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.in.h Fri Jan 11 16:57:58 2019 +0100 +++ b/libinterp/corefcn/graphics.in.h Fri Jan 11 18:14:41 2019 +0100 @@ -6161,6 +6161,10 @@ int busyaction = base_graphics_event::QUEUE); static graphics_event + create_mcode_event (const graphics_handle& h, const std::string& cmd, + int busyaction); + + static graphics_event create_function_event (event_fcn fcn, void *data = nullptr); static graphics_event