Fix Pcbnew markers in nanometer build with proper scaling factor. Use double in Zoom()
This commit is contained in:
parent
fb9e1ea010
commit
40ccdd5763
|
@ -207,13 +207,13 @@ void EDA_DRAW_PANEL::CrossHairOn( wxDC* DC )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int EDA_DRAW_PANEL::GetZoom()
|
double EDA_DRAW_PANEL::GetZoom()
|
||||||
{
|
{
|
||||||
return GetScreen()->GetZoom();
|
return GetScreen()->GetZoom();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EDA_DRAW_PANEL::SetZoom( int zoom )
|
void EDA_DRAW_PANEL::SetZoom( double zoom )
|
||||||
{
|
{
|
||||||
GetScreen()->SetZoom( zoom );
|
GetScreen()->SetZoom( zoom );
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,8 +60,11 @@ void EDA_DRAW_FRAME::Zoom_Automatique( bool aWarpPointer )
|
||||||
BASE_SCREEN* screen = GetScreen();
|
BASE_SCREEN* screen = GetScreen();
|
||||||
|
|
||||||
// Set the best zoom and get center point.
|
// 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 );
|
screen->SetScalingFactor( bestzoom );
|
||||||
|
|
||||||
if( screen->m_FirstRedraw )
|
if( screen->m_FirstRedraw )
|
||||||
|
|
|
@ -243,8 +243,9 @@ public:
|
||||||
void OnScrollWin( wxCommandEvent& event );
|
void OnScrollWin( wxCommandEvent& event );
|
||||||
void OnScroll( wxScrollWinEvent& event );
|
void OnScroll( wxScrollWinEvent& event );
|
||||||
|
|
||||||
void SetZoom( int mode );
|
void SetZoom( double mode );
|
||||||
int GetZoom();
|
double GetZoom();
|
||||||
|
|
||||||
void SetGrid( const wxRealPoint& size );
|
void SetGrid( const wxRealPoint& size );
|
||||||
wxRealPoint GetGrid();
|
wxRealPoint GetGrid();
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,8 @@
|
||||||
#include <layers_id_colors_and_visibility.h>
|
#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 ) :
|
MARKER_PCB::MARKER_PCB( BOARD_ITEM* aParent ) :
|
||||||
|
|
Loading…
Reference in New Issue