From 24b51522407537c35a502a7fddecd3814846bc79 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 15 Feb 2018 22:18:07 +0000 Subject: [PATCH] Don't set modified flag for render settings in modedit. Fixes: lp:1744521 * https://bugs.launchpad.net/kicad/+bug/1744521 --- pcbnew/pcb_layer_widget.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pcbnew/pcb_layer_widget.cpp b/pcbnew/pcb_layer_widget.cpp index 13311f272a..f874e25cb3 100644 --- a/pcbnew/pcb_layer_widget.cpp +++ b/pcbnew/pcb_layer_widget.cpp @@ -669,10 +669,13 @@ void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled ) BOARD* brd = myframe->GetBoard(); wxASSERT( aId > GAL_LAYER_ID_START && aId < GAL_LAYER_ID_END ); - // 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. - if( brd->IsElementVisible( static_cast( aId ) ) != isEnabled ) - myframe->OnModify(); + if( myframe->IsType( FRAME_PCB ) ) + { + // 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. + if( brd->IsElementVisible( static_cast( aId ) ) != isEnabled ) + myframe->OnModify(); + } brd->SetElementVisibility( static_cast( aId ), isEnabled );