# HG changeset patch # User Stefan Mahr # Date 1425304283 -3600 # Node ID 65e6207f7ae464273bf16a8df60316dc305542d8 # Parent b403780efe90c9e62c5be5e585ee86119966a75c Fix FLTK Edit uimenu to use new pan/rotate3d fcns and mousewheelzoom property. * __add_default_menu__.m (__get_axes__): Return axes and figure handle. * __add_default_menu__.m (guimode_cb): Use figure handle for pan and rotate. Use new property mousewheelzoom. diff -r b403780efe90 -r 65e6207f7ae4 scripts/plot/util/private/__add_default_menu__.m --- a/scripts/plot/util/private/__add_default_menu__.m Mon Mar 02 08:47:16 2015 +0100 +++ b/scripts/plot/util/private/__add_default_menu__.m Mon Mar 02 14:51:23 2015 +0100 @@ -86,7 +86,7 @@ endfunction -function hax = __get_axes__ (h) +function [hax, fig] = __get_axes__ (h) ## Get parent figure fig = ancestor (h, "figure"); @@ -113,23 +113,23 @@ endfunction function guimode_cb (h, e) - hax = __get_axes__ (h); + [hax, fig] = __get_axes__ (h); id = get (h, "tag"); switch (id) case "pan_on" - arrayfun (@(h) pan (h, "on"), hax) + pan (fig, "on") case "pan_xon" - arrayfun (@(h) pan (h, "xon"), hax) + pan (fig, "xon") case "pan_yon" - arrayfun (@(h) pan (h, "yon"), hax) + pan (fig, "yon") case "rotate3d" - arrayfun (@(h) rotate3d (h, "on"), hax) + rotate3d (fig, "on") case "no_pan_rotate" - arrayfun (@(h) pan (h, "off"), hax) - arrayfun (@(h) rotate3d (h, "off"), hax) + pan (fig, "off") + rotate3d (fig, "off") case "zoom_on" - arrayfun (@(h) set (h, "mouse_wheel_zoom", 0.05), hax); + arrayfun (@(h) set (h, "mousewheelzoom", 0.05), hax); case "zoom_off" - arrayfun (@(h) set (h, "mouse_wheel_zoom", 0.0), hax); + arrayfun (@(h) set (h, "mousewheelzoom", 0.0), hax); endswitch endfunction