Set the reight grid visibility at start. Display axis in libedit and viewlib.
This commit is contained in:
parent
98296334fd
commit
e55763947e
|
@ -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();
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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…
Reference in New Issue