# HG changeset patch # User Andreas Weber # Date 1408270324 -7200 # Node ID da7d9e4bda8c3b5fc023766901a7d3f051b1ac74 # Parent b155fad47055e1a37c9066ece6bb5d554dbaa915 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. diff -r b155fad47055 -r da7d9e4bda8c libinterp/corefcn/graphics.cc --- a/libinterp/corefcn/graphics.cc Sat Aug 16 22:44:26 2014 -0700 +++ b/libinterp/corefcn/graphics.cc Sun Aug 17 12:12:04 2014 +0200 @@ -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