Mercurial > hg > octave-max
changeset 14920:1abb7c083171
Make sure opengl_renderer::toolkit is defined.
* src/gl-render.cc (opengl_renderer::draw (const graphics_object&, bool)):
Define toolkit if not already done.
(opengl_renderer::draw_figure, opengl_renderer::draw_uipanel): Remove toolkit
definition.
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Wed, 04 Jul 2012 15:53:18 +0100 |
parents | c55493bb7363 |
children | 355ff41f3f97 |
files | src/gl-render.cc |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gl-render.cc +++ b/src/gl-render.cc @@ -552,6 +552,9 @@ const base_properties& props = go.get_properties (); + if (! toolkit) + toolkit = props.get_toolkit (); + if (go.isa ("figure")) draw_figure (dynamic_cast<const figure::properties&> (props)); else if (go.isa ("axes")) @@ -587,8 +590,6 @@ void opengl_renderer::draw_figure (const figure::properties& props) { - toolkit = props.get_toolkit (); - // Initialize OpenGL context init_gl_context (props.is___enhanced__ (), props.get_color_rgb ()); @@ -606,8 +607,6 @@ const figure::properties& figProps = dynamic_cast<const figure::properties&> (fig.get_properties ()); - toolkit = figProps.get_toolkit (); - // Initialize OpenGL context init_gl_context (figProps.is___enhanced__ (),