mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-10 20:09:51 +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)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Transform guess;
|
Transform guess;
|
||||||
|
bool guessFromGraphRejected = false;
|
||||||
if(!reg->isImageRequired())
|
if(!reg->isImageRequired())
|
||||||
{
|
{
|
||||||
// make a fake guess using globally optimized poses
|
// make a fake guess using globally optimized poses
|
||||||
@@ -7472,6 +7473,10 @@ bool DatabaseViewer::addConstraint(int from, int to, bool silent)
|
|||||||
{
|
{
|
||||||
guess = fromIter->second.inverse() * toIter->second;
|
guess = fromIter->second.inverse() * toIter->second;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
guessFromGraphRejected = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -7480,7 +7485,7 @@ bool DatabaseViewer::addConstraint(int from, int to, bool silent)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(guess.isNull() && !silent)
|
if(guess.isNull() && !silent && !guessFromGraphRejected)
|
||||||
{
|
{
|
||||||
if(QMessageBox::question(this,
|
if(QMessageBox::question(this,
|
||||||
tr("Add constraint without guess"),
|
tr("Add constraint without guess"),
|
||||||
@@ -7496,6 +7501,10 @@ bool DatabaseViewer::addConstraint(int from, int to, bool silent)
|
|||||||
{
|
{
|
||||||
guess.setIdentity();
|
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)
|
else if(!silent && !guessFromGraphRejected)
|
||||||
{
|
{
|
||||||
QMessageBox::StandardButton button = QMessageBox::warning(this,
|
QMessageBox::StandardButton button = QMessageBox::warning(this,
|
||||||
tr("Add link"),
|
tr("Add link"),
|
||||||
|
|||||||
Reference in New Issue
Block a user