When add a background image place it at the center of visible area.
This commit is contained in:
parent
fd8d2f8a9d
commit
10a2de6b1d
|
@ -3687,7 +3687,8 @@ void MainWindow::ActionAddBackgroundImage()
|
|||
VAbstractApplication::VApp()->NativeFileDialog());
|
||||
if (not fileName.isEmpty())
|
||||
{
|
||||
PlaceBackgroundImage(QPointF(), fileName);
|
||||
QRect viewportRect(0, 0, ui->view->viewport()->width(), ui->view->viewport()->height());
|
||||
PlaceBackgroundImage(ui->view->mapToScene(viewportRect.center()), fileName);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user