From c66344deaa296ea731298e4e80cf22de0d03ddb1 Mon Sep 17 00:00:00 2001 From: Rodion Iafarov Date: Mon, 13 Nov 2017 15:31:06 +0100 Subject: [PATCH] Process widget id as symbol in toString If we call toString on Symbol we still have quotes or backticks in case it's called from ruby gui. Processing them separately resolves the need in additional conversion. --- src/YCPValueWidgetID.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/YCPValueWidgetID.cc b/src/YCPValueWidgetID.cc index 4997596..aaa3b52 100644 --- a/src/YCPValueWidgetID.cc +++ b/src/YCPValueWidgetID.cc @@ -69,6 +69,9 @@ YCPValueWidgetID::isEqual( YWidgetID * otherID ) const string YCPValueWidgetID::toString() const { + // If value is Symbol - get symbol + if ( _value->isSymbol() ) return _value->asSymbol()->symbol(); + // Else return as string return _value->toString(); } @@ -78,4 +81,3 @@ YCPValueWidgetID::value() const { return _value; } -