Mercurial > octave-nkf
changeset 20251:9866b3202c52 stable
Let grid and autoscale buttons work when the axes is invisible (bug #44436)
* Canvas.cc (Canvas::canvasAutoAxes, Canvas::canvasToggleGrid) don't check that the axes "visible" property is on when handling grid and autoscale actions. "handlevisibility" is "on" anyway as we are dealing with the currentaxes.
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Sat, 23 May 2015 10:47:03 +0200 |
parents | ca2da088eada |
children | b5d2f6954c48 481fa65e5cab |
files | libgui/graphics/Canvas.cc |
diffstat | 1 files changed, 14 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/graphics/Canvas.cc Thu May 21 15:57:57 2015 -0700 +++ b/libgui/graphics/Canvas.cc Sat May 23 10:47:03 2015 +0200 @@ -253,24 +253,22 @@ { axes::properties& ap = Utils::properties<axes> (ax); - if (ap.handlevisibility_is ("on") && ap.is_visible ()) - { - std::string tmp; + std::string tmp; - // If any grid is off, then turn them all on. If they are all - // on, then turn them off. + // If any grid is off, then turn them all on. If they are all + // on, then turn them off. - std::string state = ((ap.get_xgrid () == "off" - || ap.get_ygrid () == "off" - || ap.get_zgrid () == "off") - ? "on" : "off"); + std::string state = ((ap.get_xgrid () == "off" + || ap.get_ygrid () == "off" + || ap.get_zgrid () == "off") + ? "on" : "off"); - ap.set_xgrid (state); - ap.set_ygrid (state); - ap.set_zgrid (state); + ap.set_xgrid (state); + ap.set_ygrid (state); + ap.set_zgrid (state); - redraw (true); - } + redraw (true); + } } } @@ -304,12 +302,9 @@ { axes::properties& ap = Utils::properties<axes> (ax); - if (ap.handlevisibility_is ("on") && ap.is_visible ()) - { - autoscale_axes (ap); + autoscale_axes (ap); - redraw (true); - } + redraw (true); } } }