%         if (lineH ~= l)
%             parentH = get_param(l, 'Parent');
%             if (parentH ~= get_param(bdroot, 'Handle'))
%                 try
%                     close_system(parentH);
%                 catch
%                     % Ignore if closing fails (closing an unsaved model is
%                     % not allowed)
%                 end
%             end
%         end
