mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
calculate zoom factor correctly for target zoom
This commit is contained in:
parent
22bd19be06
commit
873a8543df
|
@ -7362,8 +7362,9 @@ void CEditor::UpdateZoomWorld()
|
|||
{
|
||||
float OldLevel = m_ZoomMapView.GetZoom();
|
||||
m_ZoomMapView.SetZoomRange(10.0f, g_Config.m_EdLimitMaxZoomLevel ? 2000.0f : std::numeric_limits<float>::max());
|
||||
bool UpdatedZoom = m_ZoomMapView.UpdateZoom();
|
||||
float NewLevel = m_ZoomMapView.GetZoom();
|
||||
if(m_ZoomMapView.UpdateZoom() && g_Config.m_EdZoomTarget)
|
||||
if(UpdatedZoom && g_Config.m_EdZoomTarget)
|
||||
ZoomMouseTarget(NewLevel / OldLevel);
|
||||
m_WorldZoom = NewLevel / 100.0f;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue