DBViewer: enabled Reject button on landmark links

This commit is contained in:
matlabbe
2020-11-30 23:17:47 -05:00
parent ee44adeb1f
commit 3ffc8ce73f
2 changed files with 10 additions and 1 deletions
+9
View File
@@ -6019,6 +6019,7 @@ void DatabaseViewer::updateConstraintButtons()
if(ui_->label_type->text().toInt() == Link::kLandmark) if(ui_->label_type->text().toInt() == Link::kLandmark)
{ {
ui_->pushButton_reject->setEnabled(true);
return; return;
} }
@@ -7868,6 +7869,14 @@ void DatabaseViewer::rejectConstraint()
{ {
int from = ids_.at(ui_->horizontalSlider_A->value()); int from = ids_.at(ui_->horizontalSlider_A->value());
int to = ids_.at(ui_->horizontalSlider_B->value()); int to = ids_.at(ui_->horizontalSlider_B->value());
if(ui_->label_type->text().toInt() == Link::kLandmark)
{
int position = ui_->horizontalSlider_loops->value();
const rtabmap::Link & link = loopLinks_.at(position);
from = link.from();
to = link.to();
}
if(from < to) if(from < to)
{ {
int tmp = to; int tmp = to;
+1 -1
View File
@@ -2421,7 +2421,7 @@ bool ExportCloudsDialog::getExportedClouds(
} }
else else
{ {
_progressDialog->appendText(tr("No polygons created for cloud %d!").arg(iter->first), Qt::darkYellow); _progressDialog->appendText(tr("No polygons created for cloud %1!").arg(iter->first), Qt::darkYellow);
_progressDialog->setAutoClose(false); _progressDialog->setAutoClose(false);
} }