mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 17:40:23 +08:00
Fixed how images are scaled to handle images with different size
This commit is contained in:
@@ -127,6 +127,11 @@ void ImageView::loadSettings(QSettings & settings, const QString & group)
|
||||
}
|
||||
}
|
||||
|
||||
QRectF ImageView::sceneRect() const
|
||||
{
|
||||
return _graphicsView->scene()->sceneRect();
|
||||
}
|
||||
|
||||
bool ImageView::isImageShown() const
|
||||
{
|
||||
return _showImage->isChecked();
|
||||
@@ -770,6 +775,9 @@ void ImageView::clear()
|
||||
}
|
||||
_imageDepth = QPixmap();
|
||||
|
||||
_graphicsView->scene()->setSceneRect(QRectF());
|
||||
_graphicsView->setScene(_graphicsView->scene());
|
||||
|
||||
if(!_graphicsView->isVisible())
|
||||
{
|
||||
this->update();
|
||||
|
||||
Reference in New Issue
Block a user