USE_WX_ZOOM clean up and other minor improvements.
* Make USE_WX_ZOOM clipping routine actually clip rather than just test if line needs drawn. * Clean up as many USE_WX_ZOOM #ifdefs as possible. * Minor coordinate rounding improvements. * Minor scrolling and panning improvements. * Remove unused KicadGraphicContext object code.
This commit is contained in:
+4
-4
@@ -54,11 +54,11 @@ void WinEDA_DrawFrame::PutOnGrid( wxPoint* coord )
|
||||
|
||||
if( !GetBaseScreen()->m_UserGridIsON )
|
||||
{
|
||||
int tmp = wxRound( coord->x / grid_size.x );
|
||||
coord->x = wxRound( tmp * grid_size.x );
|
||||
int tmp = wxRound( (double) coord->x / grid_size.x );
|
||||
coord->x = wxRound( (double) tmp * grid_size.x );
|
||||
|
||||
tmp = wxRound( coord->y / grid_size.y );
|
||||
coord->y = wxRound( tmp * grid_size.y );
|
||||
tmp = wxRound( (double) coord->y / grid_size.y );
|
||||
coord->y = wxRound( (double) tmp * grid_size.y );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user