From 57c7d663b0f0ae02aa6eaed380d8886a14b2c99f Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 7 Oct 2021 00:16:20 +0100 Subject: [PATCH] Fix bone-headed mistake when moving panel disabling. --- eeschema/dialogs/dialog_schematic_setup.cpp | 3 ++- pcbnew/dialogs/dialog_board_setup.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/eeschema/dialogs/dialog_schematic_setup.cpp b/eeschema/dialogs/dialog_schematic_setup.cpp index a24f84931a..947557639b 100644 --- a/eeschema/dialogs/dialog_schematic_setup.cpp +++ b/eeschema/dialogs/dialog_schematic_setup.cpp @@ -105,7 +105,8 @@ void DIALOG_SCHEMATIC_SETUP::OnPageChange( wxBookCtrlEvent& event ) { int page = event.GetSelection(); - KIUI::Disable( m_treebook->GetPage( page ) ); + if( Prj().IsReadOnly() ) + KIUI::Disable( m_treebook->GetPage( page ) ); // Enable the reset button only if the page is resettable if( m_resetButton ) diff --git a/pcbnew/dialogs/dialog_board_setup.cpp b/pcbnew/dialogs/dialog_board_setup.cpp index 41b6e5aaa1..ae4b867978 100644 --- a/pcbnew/dialogs/dialog_board_setup.cpp +++ b/pcbnew/dialogs/dialog_board_setup.cpp @@ -142,7 +142,7 @@ void DIALOG_BOARD_SETUP::OnPageChange( wxBookCtrlEvent& event ) m_physicalStackup->OnLayersOptionsChanged( m_layers->GetUILayerMask() ); else if( page == m_layerSetupPage ) m_layers->SyncCopperLayers( m_physicalStackup->GetCopperLayerCount() ); - else + else if( Prj().IsReadOnly() ) KIUI::Disable( m_treebook->GetPage( page ) ); #ifdef __WXMAC__