forked from qt-creator/qt-creator
QmlDesigner: Add "closeup" option to focusObjectToCamera function
The closeup option is used for itemlibrary thumbnail generation, where the regular fit produces too small images on most imports. Change-Id: I2901a2e20d100b155111f002b22489df945e9e01 Fixes: QDS-1899 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
@@ -87,14 +87,15 @@ Item {
|
||||
}
|
||||
|
||||
|
||||
function focusObject(targetObject, rotation, updateZoom)
|
||||
function focusObject(targetObject, rotation, updateZoom, closeUp)
|
||||
{
|
||||
if (!camera)
|
||||
return;
|
||||
|
||||
camera.eulerRotation = rotation;
|
||||
var newLookAtAndZoom = _generalHelper.focusObjectToCamera(
|
||||
camera, _defaultCameraLookAtDistance, targetObject, view3d, _zoomFactor, updateZoom);
|
||||
camera, _defaultCameraLookAtDistance, targetObject, view3d, _zoomFactor,
|
||||
updateZoom, closeUp);
|
||||
_lookAtPoint = newLookAtAndZoom.toVector3d();
|
||||
_zoomFactor = newLookAtAndZoom.w;
|
||||
storeCameraState(0);
|
||||
|
||||
Reference in New Issue
Block a user