Xcos: Bug #9995 fixed - The RELATION_OP box drawn. 21/14421/4
Vladislav TRUBKIN [Tue, 15 Apr 2014 12:30:01 +0000 (14:30 +0200)]
      Also the default size of LOGICAL_OP block has been reduced.

Change-Id: Iea019e38ea4fa3e2d51840225a260a7db03d8829

scilab/CHANGES_5.5.X
scilab/modules/helptools/images/LOGICAL_OP.png
scilab/modules/helptools/images/RELATIONALOP.png
scilab/modules/scicos_blocks/macros/Misc/LOGICAL_OP.sci
scilab/modules/scicos_blocks/macros/Misc/RELATIONALOP.sci
scilab/modules/xcos/etc/Xcos-style.xml
scilab/modules/xcos/images/palettes/LOGICAL_OP.png
scilab/modules/xcos/images/palettes/RELATIONALOP.png

index cde43d8..d20f7c1 100644 (file)
@@ -16,8 +16,9 @@ Scilab Bug Fixes
 Xcos Bug Fixes
 ==============
 
-* Bug #12751 fixed - cdummy_ entry point was not found when using Code Generation.
+* Bug #9996 fixed - The RELATION_OP box drawn in the work space is not compliant to the programming.
 
+* Bug #12751 fixed - cdummy_ entry point was not found when using Code Generation.
 
 
                      Changes between version 5.4.1 and 5.5.0
index e93f6de..623f0ac 100644 (file)
Binary files a/scilab/modules/helptools/images/LOGICAL_OP.png and b/scilab/modules/helptools/images/LOGICAL_OP.png differ
index 8e3b9bb..07d64fc 100644 (file)
Binary files a/scilab/modules/helptools/images/RELATIONALOP.png and b/scilab/modules/helptools/images/RELATIONALOP.png differ
index c06c633..bc76864 100644 (file)
@@ -134,6 +134,6 @@ function [x,y,typ]=LOGICAL_OP(job,arg1,arg2)
 
         exprs=[string(nin);string(ipar)]
         gr_i=[]
-        x=standard_define([3 2],model,exprs,gr_i)
+        x=standard_define([2 2],model,exprs,gr_i)
     end
 endfunction
index a4db6e5..1dc73fb 100644 (file)
@@ -47,6 +47,7 @@ function [x,y,typ] = RELATIONALOP(job,arg1,arg2)
             end
             if (rule<0)|(rule>5) then
                 message("Incorrect operator "+string(rule)+" ; must be 0 to 5.")
+                ok=%f;
             end
             if (Datatype==1) then
                 model.sim=list("relational_op",4)
@@ -74,7 +75,21 @@ function [x,y,typ] = RELATIONALOP(job,arg1,arg2)
                 [model,graphics,ok]=set_io(model,graphics,list(in,it),list(out,ot),[],[])
             end
             if ok then
+                if rule == 0 then
+                    label = "==";
+                elseif rule == 1 then
+                    label = "~=";
+                elseif rule == 2 then
+                    label = "&lt";
+                elseif rule == 3 then
+                    label = "&lt=";
+                elseif rule == 4 then
+                    label = "&gt";
+                elseif rule == 5 then
+                    label = "&gt=";
+                end
                 graphics.exprs=exprs;
+                graphics.style=["fontSize=13;fontStyle=1;displayedLabel="+label];
                 model.ipar=[rule],
                 model.nzcross=zcr,
                 model.nmode=zcr,
@@ -85,6 +100,7 @@ function [x,y,typ] = RELATIONALOP(job,arg1,arg2)
         end
     case "define" then
         ipar=[2]
+        label="&lt";
         model=scicos_model()
         model.sim=list("relationalop",4)
         model.in=[1;1]
@@ -92,9 +108,9 @@ function [x,y,typ] = RELATIONALOP(job,arg1,arg2)
         model.ipar=ipar
         model.blocktype="c"
         model.dep_ut=[%t %f]
-
         exprs=[string(ipar);string(0)]
         gr_i=[]
-        x=standard_define([3 2],model,exprs,gr_i)
+        x=standard_define([2 2],model,exprs,gr_i)
+        x.graphics.style=["fontSize=13;fontStyle=1;displayedLabel="+label];
     end
 endfunction
index c93ca21..0fc668d 100644 (file)
         <add as="fillColor" value="white"/>
     </add>
     <add as="RELATIONALOP" extend="blockWithLabel">
-        <!-- FIXME : Show parameters over block  -->
-        <add as="displayedLabel" value="Relational&lt;BR&gt;         op : &amp;&lt;"/>
+        <add as="displayedLabel"/>
+        <!-- value for the label defined in the interface function of block -->  
     </add>
     <add as="TEXT_f" extend="Label">
         <!-- <add as="displayedLabel" value="Text"/>  -->
index 42568f0..623f0ac 100644 (file)
Binary files a/scilab/modules/xcos/images/palettes/LOGICAL_OP.png and b/scilab/modules/xcos/images/palettes/LOGICAL_OP.png differ
index 315c7a9..07d64fc 100644 (file)
Binary files a/scilab/modules/xcos/images/palettes/RELATIONALOP.png and b/scilab/modules/xcos/images/palettes/RELATIONALOP.png differ