Pcbnew - GAL: fix bug #1296811 (The grid can't be enable/disable via the layer manager)
This commit is contained in:
parent
47b5bdcd47
commit
44e1f4fa2d
|
@ -49,6 +49,8 @@
|
||||||
#include <collectors.h>
|
#include <collectors.h>
|
||||||
#include <pcbnew_id.h>
|
#include <pcbnew_id.h>
|
||||||
|
|
||||||
|
#include <gal/graphics_abstraction_layer.h>
|
||||||
|
|
||||||
|
|
||||||
/// This is a read only template that is copied and modified before adding to LAYER_WIDGET
|
/// This is a read only template that is copied and modified before adding to LAYER_WIDGET
|
||||||
const LAYER_WIDGET::ROW PCB_LAYER_WIDGET::s_render_rows[] = {
|
const LAYER_WIDGET::ROW PCB_LAYER_WIDGET::s_render_rows[] = {
|
||||||
|
@ -420,8 +422,13 @@ void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled )
|
||||||
EDA_DRAW_PANEL_GAL* galCanvas = myframe->GetGalCanvas();
|
EDA_DRAW_PANEL_GAL* galCanvas = myframe->GetGalCanvas();
|
||||||
if( galCanvas )
|
if( galCanvas )
|
||||||
{
|
{
|
||||||
KIGFX::VIEW* view = galCanvas->GetView();
|
if( aId == GRID_VISIBLE )
|
||||||
view->SetLayerVisible( ITEM_GAL_LAYER( aId ), isEnabled );
|
{
|
||||||
|
galCanvas->GetGAL()->SetGridVisibility( myframe->IsGridVisible() );
|
||||||
|
galCanvas->GetView()->MarkTargetDirty( KIGFX::TARGET_NONCACHED );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
galCanvas->GetView()->SetLayerVisible( ITEM_GAL_LAYER( aId ), isEnabled );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( galCanvas && myframe->IsGalCanvasActive() )
|
if( galCanvas && myframe->IsGalCanvasActive() )
|
||||||
|
|
Loading…
Reference in New Issue