Preferences: backward compatibility with Icp/PM (bool) now Icp/Strategy (int)

This commit is contained in:
matlabbe
2021-03-27 15:12:41 -04:00
parent 1d06173fc8
commit e7dd6cacbf
+13
View File
@@ -148,6 +148,19 @@ bool PreferencesDialogROS::readCoreSettings(const QString & filePath)
std::string value;
if(nh.getParam(i->first,value))
{
//backward compatibility
if(i->first.compare(Parameters::kIcpStrategy()) == 0)
{
if(value.compare("true") == 0)
{
value = "1";
}
else if(value.compare("false") == 0)
{
value = "0";
}
}
PreferencesDialog::setParameter(i->first, value);
++readCount;
}