www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@xregGui/@figureaxes/enableAxesMovement.m

    function enableAxesMovement(obj, fH)
%ENABLEAXESMOVEMENT Enable the continuous re-positioning of background axes
%
%  ENABLEAXESMOVEMENT(OBJ, FIG) enables the listeners that react to the
%  Children property of a figure changing.  The background and mid axes are
%  then placed in their correct stack positions.

%  Copyright 2000-2010 The MathWorks, Inc. and Ford Global Technologies, Inc.


% search for figure in known list
FIGi = [];
if ~isempty(obj.Figures)
    removebadentries(obj);
    FIGi = (fH==obj.Figures);
end

if any(FIGi)
    % Decrement the disabled count
    obj.DisabledCount(FIGi) = obj.DisabledCount(FIGi)-1;
    
    % Only re-enable if all of the disabling calls have been undone.
    if obj.DisabledCount(FIGi)<1
        obj.pPerformRestack(fH, true);
        mbcgui.hgclassesutil.setListenerEnabled(obj.BGAxesList{FIGi}, true);
    end
end