PreferencesDialog: Fixed odom stack widget index always set to ORB-SLAM2 on loading

This commit is contained in:
matlabbe
2017-09-06 11:01:39 -04:00
parent 39283a5526
commit 380fc2cbde
3 changed files with 5 additions and 20 deletions

View File

@@ -907,7 +907,6 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
//Odometry
_ui->odom_strategy->setObjectName(Parameters::kOdomStrategy().c_str());
connect(_ui->odom_strategy, SIGNAL(currentIndexChanged(int)), _ui->stackedWidget_odometryType, SLOT(setCurrentIndex(int)));
connect(_ui->odom_strategy, SIGNAL(currentIndexChanged(int)), this, SLOT(updateOdometryVisibility()));
_ui->odom_strategy->setCurrentIndex(Parameters::defaultOdomStrategy());
_ui->odom_countdown->setObjectName(Parameters::kOdomResetCountdown().c_str());
_ui->odom_holonomic->setObjectName(Parameters::kOdomHolonomic().c_str());
@@ -1628,7 +1627,6 @@ void PreferencesDialog::resetSettings(QGroupBox * groupBox)
if(groupBox->objectName() == _ui->groupBox_odometry1->objectName())
{
_ui->odom_registration->setCurrentIndex(3);
updateOdometryVisibility();
}
}
}
@@ -3950,18 +3948,6 @@ void PreferencesDialog::setupKpRoiPanel()
_ui->doubleSpinBox_kp_roi3->setValue(strings[3].toDouble()*100.0);
}
void PreferencesDialog::updateOdometryVisibility()
{
UASSERT(_ui->odom_strategy->count() == 6);
_ui->groupBox_odomF2M->setVisible(_ui->odom_strategy->currentIndex()==0);
_ui->groupBox_odomF2F->setVisible(_ui->odom_strategy->currentIndex()==1);
_ui->groupBox_odomFovis->setVisible(_ui->odom_strategy->currentIndex()==2);
_ui->groupBox_odomViso2->setVisible(_ui->odom_strategy->currentIndex()==3);
_ui->groupBox_odomDVO->setVisible(_ui->odom_strategy->currentIndex()==4);
_ui->groupBox_odomORBSLAM2->setVisible(_ui->odom_strategy->currentIndex()==5);
_ui->groupBox_odomMono->setVisible(_ui->odom_strategy->currentIndex()==6);
}
void PreferencesDialog::updateKpROI()
{
QStringList strings;

View File

@@ -63,9 +63,9 @@
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>678</width>
<height>2736</height>
<y>-531</y>
<width>673</width>
<height>2749</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_16">
@@ -86,7 +86,7 @@
<enum>QFrame::Raised</enum>
</property>
<property name="currentIndex">
<number>21</number>
<number>18</number>
</property>
<widget class="QWidget" name="page_22">
<layout class="QVBoxLayout" name="verticalLayout_29" stretch="0,1">
@@ -10018,7 +10018,7 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
<item>
<widget class="QStackedWidget" name="stackedWidget_odometryType">
<property name="currentIndex">
<number>5</number>
<number>0</number>
</property>
<widget class="QWidget" name="page_52">
<layout class="QVBoxLayout" name="verticalLayout_77">