From 181b00bf22f5555bc3e79edba3ffd8168ad7e512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20Labb=C3=A9?= Date: Fri, 10 Jul 2015 15:47:28 -0400 Subject: [PATCH] fixed crash when selecting SIFT detector while DAISY descriptor is used. --- src/ParametersToolBox.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ParametersToolBox.cpp b/src/ParametersToolBox.cpp index 5169c94..4f79e4e 100644 --- a/src/ParametersToolBox.cpp +++ b/src/ParametersToolBox.cpp @@ -569,9 +569,10 @@ void ParametersToolBox::changeParameter(const int & value) int index = descriptorBox->findText(comboBox->currentText()); if(index >= 0) { - QString tmp = Settings::getFeature2D_2Descriptor(); - *tmp.begin() = '0'+index; - Settings::setFeature2D_2Descriptor(tmp); + QStringList tmp = Settings::getFeature2D_2Descriptor().split(':'); + UASSERT(tmp.size() == 2); + QString newTmp = QString('0'+index)+":"+tmp.back(); + Settings::setFeature2D_2Descriptor(newTmp); this->updateParameter(Settings::kFeature2D_2Descriptor()); } else