Fix crash on toggling 'Render' tab items visibility

Fixes: lp:1678169
* https://bugs.launchpad.net/kicad/+bug/1678169
This commit is contained in:
Maciej Suminski 2017-03-31 17:50:52 +02:00
parent 0a8a659ff7
commit 0b57907a68
1 changed files with 1 additions and 4 deletions

View File

@ -536,9 +536,6 @@ void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled )
BOARD* brd = myframe->GetBoard(); BOARD* brd = myframe->GetBoard();
wxASSERT( aId > GAL_LAYER_ID_START && aId < GAL_LAYER_ID_END ); wxASSERT( aId > GAL_LAYER_ID_START && aId < GAL_LAYER_ID_END );
LSET visibleLayers = brd->GetVisibleLayers();
visibleLayers.set( aId, isEnabled );
// The layer visibility status is saved in the board file so set the board modified // The layer visibility status is saved in the board file so set the board modified
// state so the user has the option to save the changes. // state so the user has the option to save the changes.
if( brd->IsElementVisible( static_cast<GAL_LAYER_ID>( aId ) ) != isEnabled ) if( brd->IsElementVisible( static_cast<GAL_LAYER_ID>( aId ) ) != isEnabled )