mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
DbViewer::AddConstraint: don't ask ofr manual constraint if already aborted previous question (when Reg/Strategy=1).
This commit is contained in:
@@ -7443,6 +7443,7 @@ bool DatabaseViewer::addConstraint(int from, int to, bool silent)
|
||||
toS->id(),
|
||||
Parameters::kRGBDLoopClosureReextractFeatures().c_str());
|
||||
}
|
||||
|
||||
Transform guess;
|
||||
bool guessFromGraphRejected = false;
|
||||
if(!reg->isImageRequired())
|
||||
@@ -7472,6 +7473,10 @@ bool DatabaseViewer::addConstraint(int from, int to, bool silent)
|
||||
QMessageBox::Yes | QMessageBox::No,
|
||||
QMessageBox::Yes) == QMessageBox::Yes)
|
||||
{
|
||||
guess = fromIter->second.inverse() * toIter->second;
|
||||
}
|
||||
else
|
||||
{
|
||||
guessFromGraphRejected = true;
|
||||
}
|
||||
}
|
||||
@@ -7480,7 +7485,7 @@ bool DatabaseViewer::addConstraint(int from, int to, bool silent)
|
||||
guess = fromIter->second.inverse() * toIter->second;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(guess.isNull() && !silent && !guessFromGraphRejected)
|
||||
{
|
||||
@@ -7496,6 +7501,10 @@ bool DatabaseViewer::addConstraint(int from, int to, bool silent)
|
||||
QMessageBox::Yes | QMessageBox::Abort,
|
||||
QMessageBox::Abort) == QMessageBox::Yes)
|
||||
{
|
||||
guess.setIdentity();
|
||||
}
|
||||
else
|
||||
{
|
||||
guessFromGraphRejected = true;
|
||||
}
|
||||
}
|
||||
@@ -7519,7 +7528,7 @@ bool DatabaseViewer::addConstraint(int from, int to, bool silent)
|
||||
}
|
||||
}
|
||||
|
||||
newLink = Link(from, to, Link::kUserClosure, t, information);
|
||||
newLink = Link(from, to, Link::kUserClosure, t, information);
|
||||
}
|
||||
else if(!silent && !guessFromGraphRejected)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user