mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 00:37:46 +08:00
Added question about using odometry in database when selecting source from database
git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1434 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -1623,31 +1623,34 @@ void PreferencesDialog::selectSourceDatabase(bool user)
|
|||||||
{
|
{
|
||||||
ULOGGER_DEBUG("");
|
ULOGGER_DEBUG("");
|
||||||
|
|
||||||
if(user)
|
|
||||||
{
|
|
||||||
// from user
|
|
||||||
_ui->groupBox_sourceDatabase->setChecked(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
QString path = QFileDialog::getOpenFileName(this, tr("Select file"), _ui->source_database_lineEdit_path->text(), tr("RTAB-Map database files (*.db)"));
|
QString path = QFileDialog::getOpenFileName(this, tr("Select file"), _ui->source_database_lineEdit_path->text(), tr("RTAB-Map database files (*.db)"));
|
||||||
QFile file(path);
|
QFile file(path);
|
||||||
if(!path.isEmpty() && file.exists())
|
if(!path.isEmpty() && file.exists())
|
||||||
{
|
{
|
||||||
|
int r = QMessageBox::question(this, tr("Odometry in database..."), tr("Use odometry saved in database (if some saved)?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
||||||
|
|
||||||
|
if(user)
|
||||||
|
{
|
||||||
|
// from user
|
||||||
|
_ui->groupBox_sourceDatabase->setChecked(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
_ui->source_checkBox_ignoreOdometry->setChecked(r != QMessageBox::Yes);
|
||||||
_ui->source_database_lineEdit_path->setText(path);
|
_ui->source_database_lineEdit_path->setText(path);
|
||||||
_ui->source_spinBox_databaseStartPos->setValue(0);
|
_ui->source_spinBox_databaseStartPos->setValue(0);
|
||||||
}
|
|
||||||
|
|
||||||
if(user && _obsoletePanels)
|
if(user && _obsoletePanels)
|
||||||
{
|
|
||||||
_ui->groupBox_sourceImage->setChecked(false);
|
|
||||||
_ui->groupBox_sourceOpenni->setChecked(false);
|
|
||||||
if(validateForm())
|
|
||||||
{
|
{
|
||||||
this->writeSettings();
|
_ui->groupBox_sourceImage->setChecked(false);
|
||||||
}
|
_ui->groupBox_sourceOpenni->setChecked(false);
|
||||||
else
|
if(validateForm())
|
||||||
{
|
{
|
||||||
this->readSettingsBegin();
|
this->writeSettings();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this->readSettingsBegin();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user