Mercurial > hg > octave-nkf
changeset 19209:da7d9e4bda8c
Fix problem with detection of 3D plots to lock rotate3d
* graphics.cc: Use calc_dimensions for detection of 3D plots.
The previously used is2D method only checks for viewmat(1) == 90.
This led to a disabled rotate3d when a 3D plot was rotated
until elevation == 90.
author | Andreas Weber <andy.weber.aw@gmail.com> |
---|---|
date | Sun, 17 Aug 2014 12:12:04 +0200 |
parents | b155fad47055 |
children | 9d8f53123800 |
files | libinterp/corefcn/graphics.cc |
diffstat | 1 files changed, 8 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.cc +++ b/libinterp/corefcn/graphics.cc @@ -4998,6 +4998,8 @@ update_transform (); sync_positions (); override_defaults (obj); + // Disable rotate3d and select pan for 2D axes + set_rotate3d (get_rotate3d ()); } void @@ -6439,17 +6441,21 @@ void axes::properties::set_rotate3d (const octave_value& v) { + graphics_object parent_obj = + gh_manager::get_object (get_parent ()); + + int ndim = calc_dimensions (parent_obj); rotate3d.set (v, false, false); if (rotate3d_is ("on")) { // Disable rotate3d for 2D plots - if (get_is2D ()) + if (ndim == 2) { rotate3d.set ("off", false, false); pan.set ("on", false, false); } else - pan.set ("off", false, false); + pan.set ("off", false, false); } } @@ -7443,9 +7449,6 @@ } xproperties.update_transform (); - - // Disable rotate3d and select pan for 2D plots - xproperties.set_rotate3d (xproperties.get_rotate3d ()); } inline