Refactored code responsible for high contrast mode. Now it allows to have more than one layer on the top.

Selecting layer using the dropdown list on the toolbar influences the layer displayed in high contrast mode.
This commit is contained in:
Maciej Suminski
2013-07-16 09:26:29 +02:00
parent 20c86db71f
commit cbec733deb
7 changed files with 122 additions and 83 deletions
+2 -13
View File
@@ -356,21 +356,10 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( LAYER_NUM aLayer )
// false from this function.
myframe->setActiveLayer( aLayer, false );
// Set display settings for high contrast mode
KiGfx::VIEW* view = myframe->GetGalCanvas()->GetView();
view->GetPainter()->GetSettings()->SetActiveLayer( aLayer );
view->UpdateAllLayersColor();
view->SetTopLayer( aLayer );
if( m_alwaysShowActiveCopperLayer )
OnLayerSelected();
else if(DisplayOpt.ContrastModeDisplay)
{
if( myframe->IsGalCanvasActive() )
myframe->GetGalCanvas()->Refresh();
else
myframe->GetCanvas()->Refresh();
}
else if( DisplayOpt.ContrastModeDisplay )
myframe->GetCanvas()->Refresh();
return true;
}