Added setting active layer in PAINTER's render settings according to the PCB layer widget.

This commit is contained in:
Maciej Suminski 2013-04-04 14:17:40 +02:00
parent ccc0fb06c9
commit 6d088b4365
1 changed files with 13 additions and 1 deletions

View File

@ -34,6 +34,7 @@
#ifdef KICAD_GAL
#include <class_drawpanel_gal.h>
#include <view/view.h>
#include <painter.h>
#endif
#include <confirm.h>
#include <wxPcbStruct.h>
@ -342,8 +343,19 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( int aLayer )
// false from this function.
myframe->setActiveLayer( aLayer, false );
#ifdef KICAD_GAL
myframe->GetGalCanvas()->GetView()->GetPainter()->GetSettings()->SetActiveLayer( aLayer );
#endif /* KICAD_GAL */
if(DisplayOpt.ContrastModeDisplay)
myframe->GetCanvas()->Refresh();
{
#ifdef KICAD_GAL
if( myframe->IsGalCanvasActive() )
myframe->GetGalCanvas()->Refresh();
else
#endif
myframe->GetCanvas()->Refresh();
}
return true;
}