7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-11 16:10:10 +00:00

Don't scan for API plugins if server is disabled

This commit is contained in:
Jon Evans 2025-01-10 21:46:35 -05:00
parent eb4220bd29
commit 54e8233b36
3 changed files with 6 additions and 3 deletions
common
eeschema/tools
pcbnew/python/scripting

View File

@ -626,7 +626,8 @@ bool PGM_BASE::InitPgm( bool aHeadless, bool aSkipPyInit, bool aIsUnitTest )
GetSettingsManager().LoadProject( "" );
#ifdef KICAD_IPC_API
m_plugin_manager->ReloadPlugins();
if( commonSettings->m_Api.enable_server )
m_plugin_manager->ReloadPlugins();
#endif
// This sets the maximum tooltip display duration to 10s (up from 5) but only affects

View File

@ -2745,7 +2745,8 @@ int SCH_EDITOR_CONTROL::TogglePythonConsole( const TOOL_EVENT& aEvent )
int SCH_EDITOR_CONTROL::ReloadPlugins( const TOOL_EVENT& aEvent )
{
#ifdef KICAD_IPC_API
Pgm().GetPluginManager().ReloadPlugins();
if( Pgm().GetCommonSettings()->m_Api.enable_server )
Pgm().GetPluginManager().ReloadPlugins();
#endif
return 0;
}

View File

@ -113,7 +113,8 @@ int SCRIPTING_TOOL::reloadPlugins( const TOOL_EVENT& aEvent )
#ifdef KICAD_IPC_API
// TODO move this elsewhere when SWIG plugins are removed
Pgm().GetPluginManager().ReloadPlugins();
if( Pgm().GetCommonSettings()->m_Api.enable_server )
Pgm().GetPluginManager().ReloadPlugins();
#endif
if( !m_isFootprintEditor )