Skip to content

Commit

Permalink
Process widget id as symbol in toString
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Rodion Iafarov committed Nov 13, 2017
1 parent 1c2edd0 commit c66344d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/YCPValueWidgetID.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand All @@ -78,4 +81,3 @@ YCPValueWidgetID::value() const
{
return _value;
}

0 comments on commit c66344d

Please sign in to comment.