mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-01 17:10:26 +08:00
Fixed default nearest neighbor approach for the dictionary when the parameter is not set.
rtabmap_gui parameters panel can be opened without rtabmap parameters set on ROS (only GUI parameters can be changed). Rtabmap: added getStatistics() method for convenience Rtabmap/Memory: added deleteLastLocation() method to remove the last location in the STM. git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@779 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -401,7 +401,7 @@ void PreferencesDialog::setupSignals()
|
||||
void PreferencesDialog::clicked(const QModelIndex &index)
|
||||
{
|
||||
QStandardItem * item = _indexModel->itemFromIndex(index);
|
||||
if(item)
|
||||
if(item && item->isEnabled())
|
||||
{
|
||||
int index = item->data().toInt();
|
||||
if(_ui->radioButton_advanced->isChecked() && index >= 2)
|
||||
@@ -575,7 +575,32 @@ void PreferencesDialog::readSettings(const QString & filePath)
|
||||
{
|
||||
_parameters.clear();
|
||||
_obsoletePanels = kPanelDummy;
|
||||
this->reject();
|
||||
|
||||
// only keep GUI settings
|
||||
QStandardItem * parentItem = _indexModel->invisibleRootItem();
|
||||
if(parentItem)
|
||||
{
|
||||
for(int i=1; i<parentItem->rowCount(); ++i)
|
||||
{
|
||||
parentItem->child(i)->setEnabled(false);
|
||||
}
|
||||
}
|
||||
_ui->radioButton_basic->setEnabled(false);
|
||||
_ui->radioButton_advanced->setEnabled(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// enable settings
|
||||
QStandardItem * parentItem = _indexModel->invisibleRootItem();
|
||||
if(parentItem)
|
||||
{
|
||||
for(int i=0; i<parentItem->rowCount(); ++i)
|
||||
{
|
||||
parentItem->child(i)->setEnabled(true);
|
||||
}
|
||||
}
|
||||
_ui->radioButton_basic->setEnabled(true);
|
||||
_ui->radioButton_advanced->setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user