From 666f07bf9f285819af6a92f976196b13f443d5d2 Mon Sep 17 00:00:00 2001 From: Abdulrahman Elgendy Date: Fri, 12 Jul 2019 13:06:53 -0400 Subject: [PATCH 1/2] Fixed bug that would mis-align the outports port numbers --- +TableBlock/set_code.m | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/+TableBlock/set_code.m b/+TableBlock/set_code.m index 01bea75..2ae9b90 100644 --- a/+TableBlock/set_code.m +++ b/+TableBlock/set_code.m @@ -143,6 +143,10 @@ for i=1:size(outports,1) for j=1:size(out_handles,1) if strcmp(get_param(outports(i),'Name'),get_param(out_handles(j),'Name')) + + % Set the port number so the ports line up properly. + set_param(outports(i), 'Port', get_param(out_handles(j), 'Port')); + found = 1; end end @@ -174,6 +178,10 @@ for j = 1:size(out_handles,1) 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); + + % Set the port number so the ports line up properly. + set_param(new_port, 'Port', get_param(out_handles(j), 'Port')); + try add_line(getfullname(block_handle),dest_port,new_port_num); end -- GitLab From 85632acb1065cd1e0301bb45cc29520cfd084264 Mon Sep 17 00:00:00 2001 From: Abdulrahman Elgendy Date: Tue, 16 Jul 2019 13:47:01 -0400 Subject: [PATCH 2/2] Fixed bug that would cause the delete buttons to be unfunctional --- @RGrid/delete_g1s.m | 2 +- @RGrid/delete_g2s.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/@RGrid/delete_g1s.m b/@RGrid/delete_g1s.m index 2c5258b..f6501da 100644 --- a/@RGrid/delete_g1s.m +++ b/@RGrid/delete_g1s.m @@ -17,7 +17,7 @@ for i=1:size(object.Cells,2) end end if(~isempty(deleted)) - delete(object.Cells(deleted).result); + delete([object.Cells(deleted).result]); object.Cells(deleted) = []; end end diff --git a/@RGrid/delete_g2s.m b/@RGrid/delete_g2s.m index cf356c5..4e7c527 100644 --- a/@RGrid/delete_g2s.m +++ b/@RGrid/delete_g2s.m @@ -20,7 +20,7 @@ for i=1:size(object.Cells,2) end end if(~isempty(deleted)) - delete(object.Cells(deleted).result); + delete([object.Cells(deleted).result]); object.Cells(deleted) = []; end end -- GitLab