Commit e0cc8735 authored by Colin Eles's avatar Colin Eles
Browse files

edited code looking for unsuppressed output, need better way to do this, also...

edited code looking for unsuppressed output, need better way to do this, also removed the check system block from the block library, it still needs some work

git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/trunk/TableTool@6239 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
parent 723c0460
Loading
Loading
Loading
Loading
+7 −2
Changes for +TableBlock/delete_recursive.m: 7 added lines, 2 removed lines.
Original line number Diff line number Diff line
%% delete_recursive
%    delete line which are not collected
% inputs:
%   line_handle:float - handle to line to be deleted
% outputs:
%   none.
function delete_recursive( line_handle )

if get( line_handle, 'SrcPortHandle' ) < 0
    delete_line( line_handle ) ;
    return
    return;
end
LineChild = get( line_handle, 'LineChildren' ) ;
if ~isempty( LineChild )
    for i=1:length( LineChild )
        obj.delete_recursive( LineChild( i ) )
        obj.delete_recursive( LineChild( i ) );
    end
else
    if get( line_handle, 'DstPortHandle' ) < 0
+6 −6
Changes for +TableBlock/set_code.m: 6 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ function eml_handle = set_code(block_handle,code,function_name)
% unlink the block from the library, this is necessary if
% we
% want to change the subsystem of the block.
set_param(block_handle,'LinkStatus','none')
set_param(block_handle,'LinkStatus','none');


% determine if the name already exists in the model
@@ -43,7 +43,7 @@ if (isempty(code_blocks))
    code_blocks = add_block('simulink/User-Defined Functions/Embedded MATLAB Function',code_block);
end

eml_handle = code_blocks
eml_handle = code_blocks;
% find the state of the code block and update it to the new
% code
myState = S.find('-isa','Stateflow.EMChart', '-and', 'Path', code_block); % find which one we want to edit
@@ -62,7 +62,7 @@ lines = find_system( getfullname(block_handle), ...

for i=1:length( lines )
    if ishandle( lines( i ) )
        TableBlock.delete_recursive( lines( i ) )
        TableBlock.delete_recursive( lines( i ) );
    end
end

@@ -114,7 +114,7 @@ for j = 1:size(in_handles,1)
    end
    if (~found)
        new_port = sprintf('%s/%s',getfullname(block_handle),get_param(in_handles(j),'Name'));
        add_block('simulink/Sources/In1',new_port)
        add_block('simulink/Sources/In1',new_port);
        new_port_num = sprintf('%s/1',get_param(in_handles(j),'Name'));
        dest_port = sprintf('%s/%d','code',j);
        % sometimes line will be created automatically
@@ -163,7 +163,7 @@ for j = 1:size(out_handles,1)
    end
    if (~found)
        new_port = sprintf('%s/%s',getfullname(block_handle),get_param(out_handles(j),'Name'));
        add_block('simulink/Sinks/Out1',new_port)
        add_block('simulink/Sinks/Out1',new_port);
        new_port_num = sprintf('%s/1',get_param(out_handles(j),'Name'));
        dest_port = sprintf('%s/%d','code',j);
        try
@@ -181,7 +181,7 @@ lines = find_system( getfullname(block_handle), ...

for i=1:length( lines )
    if ishandle( lines( i ) )
        TableBlock.delete_recursive( lines( i ) )
        TableBlock.delete_recursive( lines( i ) );
    end
end

+1 −1
Changes for @Cell/delete_Cell.m: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ if(isempty(object.subgrid))
    %delete(object);
else
    % delete the subgrid
    object.subgrid.deep_delete
    object.subgrid.deep_delete;
    if(ishghandle(object.grid_pb))
        delete(object.grid_pb);
    end
+1 −1
Changes for @Cell/flag_cell.m: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ end
if (mode == 0)
    set(object.cond,'BackgroundColor',object.color);
elseif (mode == 1)
    set(object.cond,'BackgroundColor',[0.92 0.65 0.65])
    set(object.cond,'BackgroundColor',[0.92 0.65 0.65]);
elseif (mode == 2)
    set(object.cond,'BackgroundColor',[0.03 1.0 0.32]);
end
+1 −1
Changes for @Cell/pb_call.m: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ if isempty(event) || event ~= 1
    gui.undo_man.new_state(undo_data);
end

gui.update_undoredo
gui.update_undoredo;


end
Loading