changeset 24635:b708857d634e

Correctly display boolean properties default values (bug #52768) * graphics.in.h (bool_property::bool_property): correctly set default string in constructor * contributors.in: add Sahil Yadav
author Sahil Yadav <yadavsahil5198@gmail.com>
date Tue, 23 Jan 2018 10:45:23 +0100
parents ab2321d4ba03
children 9d01ce02d5cb
files doc/interpreter/contributors.in libinterp/corefcn/graphics.in.h
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/contributors.in	Mon Jan 22 02:17:46 2018 -0500
+++ b/doc/interpreter/contributors.in	Tue Jan 23 10:45:23 2018 +0100
@@ -424,6 +424,7 @@
 Joachim Wiesemann
 Alexander Wilms
 Georg Wiora
+Sahil Yadav
 Fook Fah Yap
 Sean Young
 Michele Zaffalon
--- a/libinterp/corefcn/graphics.in.h	Mon Jan 22 02:17:46 2018 -0500
+++ b/libinterp/corefcn/graphics.in.h	Tue Jan 23 10:45:23 2018 +0100
@@ -1589,7 +1589,8 @@
 
   bool_property (const std::string& nm, const graphics_handle& h,
                  const char *val)
-    : radio_property (nm, h, radio_values ("on|off"), val)
+    : radio_property (nm, h, radio_values (std::string (val) == "on" ? 
+                                           "{on}|off" : "on|{off}"), val)
   { }
 
   bool_property (const bool_property& p)