From 23db557317527c3f16701e925bf7c41c74c0dfa4 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Wed, 18 Dec 2024 21:34:14 -0500 Subject: [PATCH] Support building with KICAD_IPC_API off Fixes https://gitlab.com/kicad/code/kicad/-/issues/19321 --- pcbnew/dialogs/panel_pcbnew_action_plugins.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pcbnew/dialogs/panel_pcbnew_action_plugins.cpp b/pcbnew/dialogs/panel_pcbnew_action_plugins.cpp index e281f796b1..2eb2861161 100644 --- a/pcbnew/dialogs/panel_pcbnew_action_plugins.cpp +++ b/pcbnew/dialogs/panel_pcbnew_action_plugins.cpp @@ -153,6 +153,7 @@ bool PANEL_PCBNEW_ACTION_PLUGINS::TransferDataFromWindow() PCBNEW_SETTINGS* settings = dynamic_cast( Kiface().KifaceSettings() ); wxASSERT( settings ); +#ifdef KICAD_IPC_API API_PLUGIN_MANAGER& mgr = Pgm().GetPluginManager(); if( settings ) @@ -176,6 +177,20 @@ bool PANEL_PCBNEW_ACTION_PLUGINS::TransferDataFromWindow() } } } +#else + if( settings ) + { + settings->m_VisibleActionPlugins.clear(); + + for( int ii = 0; ii < m_grid->GetNumberRows(); ii++ ) + { + wxString id = m_grid->GetCellValue( ii, COLUMN_SETTINGS_IDENTIFIER ); + + settings->m_VisibleActionPlugins.emplace_back( std::make_pair( + id, m_grid->GetCellValue( ii, COLUMN_VISIBLE ) == wxT( "1" ) ) ); + } + } +#endif return true; }