Some more spots where the GAL refresh was required.

This commit is contained in:
Maciej Suminski
2013-09-06 17:06:02 +02:00
parent bc67fc338e
commit 7e73dad7b0
3 changed files with 19 additions and 12 deletions
+11 -4
View File
@@ -234,8 +234,12 @@ void EDA_DRAW_FRAME::SkipNextLeftButtonReleaseEvent()
void EDA_DRAW_FRAME::OnToggleGridState( wxCommandEvent& aEvent )
{
SetGridVisibility( !IsGridVisible() );
if( m_galCanvasActive )
{
m_galCanvas->GetGAL()->SetGridVisibility( IsGridVisible() );
m_galCanvas->GetView()->MarkTargetDirty( KiGfx::TARGET_NONCACHED );
}
RefreshCanvas();
}
@@ -392,11 +396,12 @@ void EDA_DRAW_FRAME::OnSelectGrid( wxCommandEvent& event )
if( m_galCanvasActive )
{
KiGfx::GAL* gal = m_galCanvas->GetGAL();
gal->SetGridSize( VECTOR2D( screen->GetGrid().m_Size.x, screen->GetGrid().m_Size.y ) );
m_galCanvas->GetGAL()->SetGridSize( VECTOR2D( screen->GetGrid().m_Size.x,
screen->GetGrid().m_Size.y ) );
m_galCanvas->GetView()->MarkTargetDirty( KiGfx::TARGET_NONCACHED );
}
Refresh();
RefreshCanvas();
}
@@ -1011,6 +1016,8 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable )
m_auimgr.GetPane( wxT( "DrawFrameGal" ) ).Show( aEnable );
m_auimgr.Update();
m_galCanvas->SetFocus();
m_galCanvasActive = aEnable;
if( aEnable )
m_galCanvas->SetFocus();
}