From a0aecf16375d34d16914315c842a41c4ba0f714c Mon Sep 17 00:00:00 2001 From: Marton Ady <marton.ady@cern.ch> Date: Thu, 8 Dec 2022 12:11:22 +0100 Subject: [PATCH] Add a small autoscale distance offset for line-only geometries to prevent 0x0 width view --- Interface/GeometryViewer_shared.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Interface/GeometryViewer_shared.cpp b/Interface/GeometryViewer_shared.cpp index 38cacd8f..1e05d524 100644 --- a/Interface/GeometryViewer_shared.cpp +++ b/Interface/GeometryViewer_shared.cpp @@ -990,7 +990,7 @@ void GeometryViewer::AutoScale(bool reUpdateMouseCursor) { view.camDist = 1.0; double mDist = Max((xMax - xMin), (yMax - yMin)*aspect); - mDist *= 1.1; // 10% margin + mDist = mDist*1.1+.1; // 10% margin and small extra for 0-width geometries double dx = (xMax + xMin) / 2.0; double dy = (yMax + yMin) / 2.0; view.vLeft = dx - mDist / 2.0; -- GitLab