Commit 83e4c55d authored by Colin Eles's avatar Colin Eles
Browse files

fixed bug of not being able to save to initalized blocks or from matlab mode

git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/trunk/TableTool@5865 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
parent cac46c31
Loading
Loading
Loading
Loading
+15 −6
Original line number Diff line number Diff line
@@ -434,14 +434,23 @@ classdef GUI < handle
        end
        
        function type = output_data_type(object)
            if (object.mode == 1)
                S = sfroot;
                code_block = sprintf('%s/code',getfullname(object.block_handle));
                code_blocks = find_system(getfullname(object.block_handle),'BlockType','SubSystem','Name','code');
                if ~isempty(code_blocks)
                    myState = S.find('-isa','Stateflow.EMChart', '-and', 'Path', code_block); % find which one we want to edit
                    if strncmp(myState.Outputs.DataType,'Inherit',7);
                        type = ''
                    else
                        type = myState.Outputs.DataType;
                    end
                else
                    type = '';
                end
            else
                type = ''
            end
        end
        
        %% save_call