Mercurial > hg > octave-lojdl
changeset 14395:e41e538e9d03
Fix TickDir handling for 2D and 3D plots (bug #35575).
* graphics.cc (update_ticklength): Set TickDir direction based
on 2D versus 3D.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Thu, 23 Feb 2012 12:25:23 -0800 |
parents | d17237256856 |
children | e8bc9c02533a |
files | src/graphics.cc |
diffstat | 1 files changed, 4 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/graphics.cc +++ b/src/graphics.cc @@ -4942,19 +4942,11 @@ bool mode2d = (((xstate > AXE_DEPTH_DIR ? 1 : 0) + (ystate > AXE_DEPTH_DIR ? 1 : 0) + (zstate > AXE_DEPTH_DIR ? 1 : 0)) == 2); + if (tickdirmode_is ("auto")) - { - // FIXME: tickdir should be updated (code below comes - // from JHandles) - //autoMode++; - //TickDir.set(mode2d ? "in" : "out", true); - //autoMode--; - } - - //double ticksign = (tickdir_is ("in") ? -1 : 1); - double ticksign = (tickdirmode_is ("auto") ? - (mode2d ? -1 : 1) : - (tickdir_is ("in") ? -1 : 1)); + tickdir.set (mode2d ? "in" : "out", true); + + double ticksign = (tickdir_is ("in") ? -1 : 1); Matrix bbox = get_boundingbox (true); Matrix ticklen = get_ticklength ().matrix_value ();