Fix 3dmouse navigation in 3d-viewer orthographic projection.
The zoom level was being incorrectly calculated. When zooming in on a PCB, the zoom function can become disabled if you get too close. At which point you need to use the mouse wheel to zoom back out.
This commit is contained in:
parent
e590d07224
commit
53cf899b67
|
@ -397,7 +397,7 @@ long NL_3D_VIEWER_PLUGIN_IMPL::SetViewExtents( const navlib::box_t& extents )
|
|||
{
|
||||
const CAMERA_FRUSTUM& f = m_camera->GetFrustum();
|
||||
|
||||
float factor = 2 * f.nw / ( extents.max_x - extents.min_x );
|
||||
float factor = f.nw / ( extents.max_x - extents.min_x );
|
||||
float zoom = m_camera->GetZoom() / factor;
|
||||
|
||||
m_camera->Zoom( factor );
|
||||
|
|
Loading…
Reference in New Issue