Skip to content

Commit

Permalink
ParametersToolbox: fixed unsigned int parameter type not showing in t…
Browse files Browse the repository at this point in the history
…oolbox
  • Loading branch information
matlabbe committed Apr 15, 2023
1 parent 0070de4 commit 0f221ba
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions guilib/src/ParametersToolBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,26 +296,25 @@ void ParametersToolBox::addParameter(
{
addParameter(layout, key.c_str(), QString::fromStdString(value));
}
else if(type.compare("int") == 0)
else if(type.compare("int") == 0 ||
type.compare("uint") == 0 ||
type.compare("unsigned int") == 0)
{
addParameter(layout, key.c_str(), uStr2Int(value));
}
else if(type.compare("uint") == 0)
{
addParameter(layout, key.c_str(), uStr2Int(value));
}
else if(type.compare("double") == 0)
{
addParameter(layout, key.c_str(), uStr2Double(value));
}
else if(type.compare("float") == 0)
else if(type.compare("double") == 0 ||
type.compare("float") == 0)
{
addParameter(layout, key.c_str(), uStr2Double(value));
}
else if(type.compare("bool") == 0)
{
addParameter(layout, key.c_str(), uStr2Bool(value));
}
else
{
UWARN("Not implemented type \"%s\" for parameter \"%s\". Parameter is not added to toolbox.", type.c_str(), key.c_str());
}
}

void ParametersToolBox::addParameter(QVBoxLayout * layout,
Expand Down

0 comments on commit 0f221ba

Please sign in to comment.