Commit 40ccdd57 authored by Dick Hollenbeck's avatar Dick Hollenbeck
Browse files

Fix Pcbnew markers in nanometer build with proper scaling factor. Use double in Zoom()

parent fb9e1ea0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -207,13 +207,13 @@ void EDA_DRAW_PANEL::CrossHairOn( wxDC* DC )
}


int EDA_DRAW_PANEL::GetZoom()
double EDA_DRAW_PANEL::GetZoom()
{
    return GetScreen()->GetZoom();
}


void EDA_DRAW_PANEL::SetZoom( int zoom )
void EDA_DRAW_PANEL::SetZoom( double zoom )
{
    GetScreen()->SetZoom( zoom );
}
+4 −1
Original line number Diff line number Diff line
@@ -60,8 +60,11 @@ void EDA_DRAW_FRAME::Zoom_Automatique( bool aWarpPointer )
    BASE_SCREEN* screen = GetScreen();

    // Set the best zoom and get center point.
    double bestzoom = BestZoom();

    // BestZoom() can compute an illegal zoom if the client window size
    // is small, say because frame is not maximized.  So use the clamping form
    // of SetZoom():
    double bestzoom = BestZoom();
    screen->SetScalingFactor( bestzoom );

    if( screen->m_FirstRedraw )
+3 −2
Original line number Diff line number Diff line
@@ -243,8 +243,9 @@ public:
    void OnScrollWin( wxCommandEvent& event );
    void OnScroll( wxScrollWinEvent& event );

    void SetZoom( int mode );
    int GetZoom();
    void SetZoom( double mode );
    double GetZoom();

    void SetGrid( const wxRealPoint& size );
    wxRealPoint GetGrid();

+2 −1
Original line number Diff line number Diff line
@@ -15,7 +15,8 @@
#include <layers_id_colors_and_visibility.h>


#define SCALING_FACTOR 30       // Adjust the actual size of markers, when using default shape
/// Adjust the actual size of markers, when using default shape
#define SCALING_FACTOR      DMils2iu( 30 )


MARKER_PCB::MARKER_PCB( BOARD_ITEM* aParent ) :