Keep the Tkscale block label if block already has label 14/18614/13
diptighosalkar [Tue, 22 Nov 2016 12:21:25 +0000 (17:21 +0530)]
Change-Id: I5d9ad85d0cfc912c68c199ece2c1fb10d322107e

scilab/CHANGES.md
scilab/modules/scicos_blocks/macros/Sources/tkscaleblk.sci

index 9a8c9a9..cba7bb6 100644 (file)
@@ -436,6 +436,7 @@ Bug Fixes
 * [#14887](http://bugzilla.scilab.org/show_bug.cgi?id=14887): For many graphic handle types, the display of the `.tag` value missed `".."` delimiters
 * [#14909](http://bugzilla.scilab.org/show_bug.cgi?id=14909): getlongpathname and getshortpathname return values with "\" instead of "/"
 * [#14941](http://bugzilla.scilab.org/show_bug.cgi?id=14941): `find` did not accept encoded integers
+* [#14942](http://bugzilla.scilab.org/show_bug.cgi?id=14942): Keep the Tkscale block label if block already has label.
 
 ### Bugs fixed in 6.0.0 beta-2 and earlier 6.0.0 pre-releases:
 
index 7d44418..57c2098 100644 (file)
@@ -44,7 +44,13 @@ function block=tkscaleblk(block,flag)
             return;
         end
 
-        f = figure("Figure_name", "TK Source: " + block.label, ...
+        if length(block.label) == 0 then
+            tk_label = string(curblock());
+        else
+            tk_label = block.label;
+        end
+
+        f = figure("Figure_name", "TK Source: " + tk_label, ...
         "dockable", "off", ...
         "infobar_visible" , "on", ...
         "toolbar", "none", ...