mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 09:30:25 +08:00
DbViewer: neighbor links can be rejected (a warning about splitting the graph is shown though)
This commit is contained in:
@@ -5495,9 +5495,7 @@ void DatabaseViewer::updateConstraintButtons()
|
|||||||
{
|
{
|
||||||
if(!containsLink(linksRemoved_, from ,to))
|
if(!containsLink(linksRemoved_, from ,to))
|
||||||
{
|
{
|
||||||
ui_->pushButton_reject->setEnabled(
|
ui_->pushButton_reject->setEnabled(true);
|
||||||
currentLink.type() != Link::kNeighbor &&
|
|
||||||
currentLink.type() != Link::kNeighborMerged);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//check for modified link
|
//check for modified link
|
||||||
@@ -7109,8 +7107,13 @@ void DatabaseViewer::rejectConstraint()
|
|||||||
{
|
{
|
||||||
if(iter->second.type() == Link::kNeighbor || iter->second.type() == Link::kNeighborMerged)
|
if(iter->second.type() == Link::kNeighbor || iter->second.type() == Link::kNeighborMerged)
|
||||||
{
|
{
|
||||||
UWARN("Cannot reject neighbor links (%d->%d)", from, to);
|
QMessageBox::StandardButton button = QMessageBox::warning(this, tr("Reject link"),
|
||||||
return;
|
tr("Removing the neighbor link %1->%2 will split the graph. Do you want to continue?").arg(from).arg(to),
|
||||||
|
QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
|
||||||
|
if(button != QMessageBox::Yes)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
linksRemoved_.insert(*iter);
|
linksRemoved_.insert(*iter);
|
||||||
removed = true;
|
removed = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user