mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-05 01:27:46 +08:00
Fixed odom cache overlay not visible
This commit is contained in:
@@ -803,10 +803,15 @@ void GraphViewer::updateGraph(const std::map<int, Transform> & poses,
|
|||||||
{
|
{
|
||||||
(--_nodeItems.end()).value()->setColor(_nodeOdomCacheColor);
|
(--_nodeItems.end()).value()->setColor(_nodeOdomCacheColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QRectF rect = this->scene()->sceneRect();
|
||||||
|
if(!odomCacheIds.empty())
|
||||||
|
_odomCacheOverlay->setRect(rect);
|
||||||
|
else
|
||||||
|
_odomCacheOverlay->setRect(0, 0, 0, 0);
|
||||||
|
|
||||||
if(wasEmpty)
|
if(wasEmpty)
|
||||||
{
|
{
|
||||||
QRectF rect = this->scene()->sceneRect();
|
|
||||||
this->fitInView(rect.adjusted(-rect.width()/2.0f, -rect.height()/2.0f, rect.width()/2.0f, rect.height()/2.0f), Qt::KeepAspectRatio);
|
this->fitInView(rect.adjusted(-rect.width()/2.0f, -rect.height()/2.0f, rect.width()/2.0f, rect.height()/2.0f), Qt::KeepAspectRatio);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user