Browse Source

Flip Viewport when Flip board is enabled

newinvert
Josue Huaroto 2 years ago
committed by Jeff Young
parent
commit
a8e18e2d8c
Failed to extract signature
  1. 2
      common/view/view.cpp
  2. 5
      pcbnew/widgets/appearance_controls.cpp

2
common/view/view.cpp

@ -521,7 +521,7 @@ void VIEW::SetViewport( const BOX2D& aViewport )
{
VECTOR2D ssize = ToWorld( m_gal->GetScreenPixelSize(), false );
wxCHECK( ssize.x > 0 && ssize.y > 0, /*void*/ );
wxCHECK( fabs(ssize.x) > 0 && fabs(ssize.y) > 0, /*void*/ );
VECTOR2D centre = aViewport.Centre();
VECTOR2D vsize = aViewport.GetSize();

5
pcbnew/widgets/appearance_controls.cpp

@ -2906,6 +2906,11 @@ void APPEARANCE_CONTROLS::onViewportChanged( wxCommandEvent& aEvent )
void APPEARANCE_CONTROLS::doApplyViewport( const VIEWPORT& aViewport )
{
m_frame->GetCanvas()->GetView()->SetViewport( aViewport.rect );
if( m_cbFlipBoard->GetValue() )
{
m_frame->GetCanvas()->GetView()->SetMirror( true, false );
m_frame->GetCanvas()->GetView()->RecacheAllItems();
}
m_frame->GetCanvas()->Refresh();
}

Loading…
Cancel
Save