Loading common/drawframe.cpp +11 −4 Original line number Diff line number Diff line Loading @@ -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(); } Loading Loading @@ -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(); } Loading Loading @@ -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(); } include/view/view.h +6 −1 Original line number Diff line number Diff line Loading @@ -267,8 +267,13 @@ public: */ inline void SetLayerVisible( int aLayer, bool aVisible = true ) { if( m_layers[aLayer].enabled != aVisible ) { // Target has to be redrawn after changing its visibility MarkTargetDirty( m_layers[aLayer].target ); m_layers[aLayer].enabled = aVisible; } } /** * Function IsLayerVisible() Loading pcbnew/class_pcb_layer_widget.cpp +2 −7 Original line number Diff line number Diff line Loading @@ -401,13 +401,8 @@ void PCB_LAYER_WIDGET::OnLayerVisible( LAYER_NUM aLayer, bool isVisible, bool is } if( isFinal ) { if( myframe->IsGalCanvasActive() ) galCanvas->Refresh(); else myframe->RefreshCanvas(); } } void PCB_LAYER_WIDGET::OnRenderColorChange( int aId, EDA_COLOR_T aColor ) { Loading Loading
common/drawframe.cpp +11 −4 Original line number Diff line number Diff line Loading @@ -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(); } Loading Loading @@ -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(); } Loading Loading @@ -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(); }
include/view/view.h +6 −1 Original line number Diff line number Diff line Loading @@ -267,8 +267,13 @@ public: */ inline void SetLayerVisible( int aLayer, bool aVisible = true ) { if( m_layers[aLayer].enabled != aVisible ) { // Target has to be redrawn after changing its visibility MarkTargetDirty( m_layers[aLayer].target ); m_layers[aLayer].enabled = aVisible; } } /** * Function IsLayerVisible() Loading
pcbnew/class_pcb_layer_widget.cpp +2 −7 Original line number Diff line number Diff line Loading @@ -401,13 +401,8 @@ void PCB_LAYER_WIDGET::OnLayerVisible( LAYER_NUM aLayer, bool isVisible, bool is } if( isFinal ) { if( myframe->IsGalCanvasActive() ) galCanvas->Refresh(); else myframe->RefreshCanvas(); } } void PCB_LAYER_WIDGET::OnRenderColorChange( int aId, EDA_COLOR_T aColor ) { Loading