Browse Source

Set the reight grid visibility at start. Display axis in libedit and viewlib.

pull/13/head
jean-pierre charras 7 years ago
committed by Jeff Young
parent
commit
e55763947e
  1. 4
      common/gal/opengl/opengl_gal.cpp
  2. 2
      eeschema/libedit/lib_edit_frame.cpp
  3. 3
      eeschema/sch_edit_frame.cpp
  4. 4
      eeschema/viewlib_frame.cpp

4
common/gal/opengl/opengl_gal.cpp

@ -1002,7 +1002,7 @@ void OPENGL_GAL::DrawCurve( const VECTOR2D& aStartPoint, const VECTOR2D& aContro
void OPENGL_GAL::DrawBitmap( const BITMAP_BASE& aBitmap )
{
int ppi = aBitmap.GetPPI();
double w = (double) aBitmap.GetSizePixels().x / (double) ppi / worldUnitLength * 10.0; // no idea where the factor 10 comes from...
double h = (double) aBitmap.GetSizePixels().y / (double) ppi / worldUnitLength * 10.0;
@ -1011,7 +1011,7 @@ void OPENGL_GAL::DrawBitmap( const BITMAP_BASE& aBitmap )
glm::vec4 v0 = xform * glm::vec4( -w/2, -h/2, 0.0, 0.0 );
glm::vec4 v1 = xform * glm::vec4( w/2, h/2, 0.0, 0.0 );
glm::vec4 trans = xform[3];
auto id = bitmapCache->RequestBitmap( &aBitmap );
auto oldTarget = GetTarget();

2
eeschema/libedit/lib_edit_frame.cpp

@ -282,6 +282,8 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
SyncView();
GetGalCanvas()->GetViewControls()->SetSnapping( true );
GetGalCanvas()->GetView()->UseDrawPriority( true );
GetGalCanvas()->GetGAL()->SetGridVisibility( IsGridVisible() );
GetGalCanvas()->GetGAL()->SetAxesEnabled( true );
}

3
eeschema/sch_edit_frame.cpp

@ -432,6 +432,9 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ):
Zoom_Automatique( false );
if( GetGalCanvas() )
GetGalCanvas()->GetGAL()->SetGridVisibility( IsGridVisible() );
// Net list generator
DefaultExecFlags();

4
eeschema/viewlib_frame.cpp

@ -203,6 +203,8 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame
SyncView();
GetGalCanvas()->GetViewControls()->SetSnapping( true );
GetGalCanvas()->GetGAL()->SetAxesEnabled( true );
GetGalCanvas()->GetGAL()->SetGridVisibility( IsGridVisible() );
}
@ -760,6 +762,6 @@ const BOX2I LIB_VIEW_FRAME::GetDocumentExtents() const
{
EDA_RECT bbox = part->GetUnitBoundingBox( m_unit, m_convert );
return BOX2I( bbox.GetOrigin(), VECTOR2I( bbox.GetWidth(), bbox.GetHeight() ) );
}
}
Loading…
Cancel
Save