Zoom context menu: minor enhancement (gal mode).

This commit is contained in:
jean-pierre charras 2018-12-28 14:08:01 +01:00
parent 72a1052bb9
commit 8cc3912b6c
1 changed files with 5 additions and 1 deletions

View File

@ -73,5 +73,9 @@ void ZOOM_MENU::update()
(int) screen->m_ZoomList.size() );
for( int i = 0; i < maxZoomIds; ++i )
Check( ID_POPUP_ZOOM_LEVEL_START+1 + i, std::fabs( zoomList[i] - zoom ) < 1e-6 );
{
// Search for a value near the current zoom setting:
double rel_error = std::fabs( zoomList[i] - zoom )/zoom;
Check( ID_POPUP_ZOOM_LEVEL_START+1 + i, rel_error < 0.1 );
}
}