Modified default grid/origin settings.

This commit is contained in:
Maciej Suminski 2013-09-10 14:35:10 +02:00
parent 082f3f9bb4
commit 08e797551b
2 changed files with 8 additions and 8 deletions

View File

@ -981,18 +981,16 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable )
// Switch to GAL rendering // Switch to GAL rendering
if( !m_galCanvasActive ) if( !m_galCanvasActive )
{ {
// Set up grid settings
gal->SetGridVisibility( IsGridVisible() );
gal->SetGridSize( VECTOR2D( screen->GetGridSize().x, screen->GetGridSize().y ) );
gal->SetGridOrigin( VECTOR2D( screen->GetGridOrigin() ) );
gal->SetGridOriginMarkerSize( 15 );
gal->SetGridDrawThreshold( 10 );
// Set up viewport // Set up viewport
double zoom = 1.0 / ( zoomFactor * m_canvas->GetZoom() ); double zoom = 1.0 / ( zoomFactor * m_canvas->GetZoom() );
view->SetScale( zoom ); view->SetScale( zoom );
view->SetCenter( VECTOR2D( m_canvas->GetScreenCenterLogicalPosition() ) ); view->SetCenter( VECTOR2D( m_canvas->GetScreenCenterLogicalPosition() ) );
} }
// Set up grid settings
gal->SetGridVisibility( IsGridVisible() );
gal->SetGridSize( VECTOR2D( screen->GetGridSize().x, screen->GetGridSize().y ) );
gal->SetGridOrigin( VECTOR2D( screen->GetGridOrigin() ) );
} }
else else
{ {

View File

@ -48,12 +48,14 @@ GAL::GAL() :
// Set grid defaults // Set grid defaults
SetGridVisibility( true ); SetGridVisibility( true );
SetGridStyle( GRID_STYLE_LINES ); SetGridStyle( GRID_STYLE_LINES );
SetGridOriginMarkerSize( 15 );
SetGridDrawThreshold( 10 );
SetCoarseGrid( 10 ); SetCoarseGrid( 10 );
SetGridLineWidth( 0.5 ); SetGridLineWidth( 0.5 );
// Initialize the cursor shape // Initialize the cursor shape
SetCursorColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); SetCursorColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) );
SetCursorSize( 20 ); SetCursorSize( 15 );
SetCursorEnabled( true ); SetCursorEnabled( true );
strokeFont.LoadNewStrokeFont( newstroke_font, newstroke_font_bufsize ); strokeFont.LoadNewStrokeFont( newstroke_font, newstroke_font_bufsize );