fixed crash when selecting SIFT detector while DAISY descriptor is used.

This commit is contained in:
Mathieu Labbé 2015-07-10 15:47:28 -04:00
parent 4b5da36512
commit 181b00bf22

View File

@ -569,9 +569,10 @@ void ParametersToolBox::changeParameter(const int & value)
int index = descriptorBox->findText(comboBox->currentText()); int index = descriptorBox->findText(comboBox->currentText());
if(index >= 0) if(index >= 0)
{ {
QString tmp = Settings::getFeature2D_2Descriptor(); QStringList tmp = Settings::getFeature2D_2Descriptor().split(':');
*tmp.begin() = '0'+index; UASSERT(tmp.size() == 2);
Settings::setFeature2D_2Descriptor(tmp); QString newTmp = QString('0'+index)+":"+tmp.back();
Settings::setFeature2D_2Descriptor(newTmp);
this->updateParameter(Settings::kFeature2D_2Descriptor()); this->updateParameter(Settings::kFeature2D_2Descriptor());
} }
else else