Mercurial > hg > octave-lyh
diff src/graphics.cc @ 12347:f6763ab98609
Prevent race condition in update_axes_layout
author | Konstantinos Poulios <logari81@googlemail.com> |
---|---|
date | Sun, 06 Feb 2011 02:24:28 +0100 |
parents | 63dc132a1000 |
children | d1e48a4a9a0b |
line wrap: on
line diff
--- a/src/graphics.cc +++ b/src/graphics.cc @@ -3899,9 +3899,14 @@ x_gl_mat2 = x_viewport * x_projection; } +static bool updating_axes_layout = false; + void axes::properties::update_axes_layout (void) { + if (updating_axes_layout) + return; + graphics_xform xform = get_transform (); double xd = (xdir_is ("normal") ? 1 : -1); @@ -3991,6 +3996,10 @@ zPlaneN = (zPlane == z_min ? z_max : z_min); fz = (z_max-z_min)/sqrt(dir(0)*dir(0)+dir(1)*dir(1)); + unwind_protect frame; + frame.protect_var (updating_axes_layout); + updating_axes_layout = true; + update_ticklengths (); xySym = (xd*yd*(xPlane-xPlaneN)*(yPlane-yPlaneN) > 0);