www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgtools/@cgbrowser/HideNode.m

    function OK = HideNode(h)
%HIDENODE Hide the current node on cage browser
%
%  OK = HIDENODE(CGB) hides the current node's view.

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


OK = false;
if h.GUIExists
    if h.ViewCurrent~=1 && isvalid(h.SelNode)
        % Hide Old View
        OK = h.closesubfigures;
        if OK
            msgID = h.addStatusMsg('Closing current node...');
            [View, OK] = hide(h.SelNode.info,h,h.getViewData);
            if OK
                h.setViewData(View);
            end
            h.removeStatusMsg(msgID);
        end
        
        updateConnections(h);
    else
        OK = true;
    end
end