www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@xregGui/@figureaxes/disableAxesMovement.m
function disableAxesMovement(obj, fH) %DISABLEAXESMOVEMENT Disable the continuous re-positioning of background axes % % DISABLEAXESMOVEMENT(OBJ, FIG) disables the listeners that react to the % Children property of a figure changing. This is useful in preventing % potentially large numbers of child reordering operations while GUIs are % being created. However, if the listeners are not re-enabled there % could be undesired graphical glitches in the final GUI. % 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); mbcgui.hgclassesutil.setListenerEnabled(obj.BGAxesList{FIGi}, false); % Increment the counter of disabled calls obj.DisabledCount(FIGi) = obj.DisabledCount(FIGi) + 1; end