mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-21 18:03:45 +00:00
Move net inspector bulk update threshold to advanced config
This commit is contained in:
parent
e6cead5218
commit
6bc77195bd
@ -125,6 +125,8 @@ static const wxChar MinParallelAngle[] = wxT( "MinParallelAngle" );
|
||||
static const wxChar HoleWallPaintingMultiplier[] = wxT( "HoleWallPaintingMultiplier" );
|
||||
static const wxChar MsgPanelShowUuids[] = wxT( "MsgPanelShowUuids" );
|
||||
static const wxChar MaximumThreads[] = wxT( "MaximumThreads" );
|
||||
static const wxChar NetInspectorBulkUpdateOptimisationThreshold[] =
|
||||
wxT( "NetInspectorBulkUpdateOptimisationThreshold" );
|
||||
|
||||
} // namespace KEYS
|
||||
|
||||
@ -303,6 +305,8 @@ ADVANCED_CFG::ADVANCED_CFG()
|
||||
|
||||
m_MinimumMarkerSeparationDistance = 0.15;
|
||||
|
||||
m_NetInspectorBulkUpdateOptimisationThreshold = 25;
|
||||
|
||||
loadFromConfigFile();
|
||||
}
|
||||
|
||||
@ -583,6 +587,11 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
|
||||
&m_MaximumThreads, m_MaximumThreads,
|
||||
0, 500 ) );
|
||||
|
||||
configParams.push_back(
|
||||
new PARAM_CFG_INT( true, AC_KEYS::NetInspectorBulkUpdateOptimisationThreshold,
|
||||
&m_NetInspectorBulkUpdateOptimisationThreshold,
|
||||
m_NetInspectorBulkUpdateOptimisationThreshold, 0, 1000 ) );
|
||||
|
||||
// Special case for trace mask setting...we just grab them and set them immediately
|
||||
// Because we even use wxLogTrace inside of advanced config
|
||||
wxString traceMasks;
|
||||
|
@ -740,7 +740,17 @@ public:
|
||||
*/
|
||||
double m_MinimumMarkerSeparationDistance;
|
||||
|
||||
///@}
|
||||
/**
|
||||
* When updating the net inspector, it either recalculates all nets or iterates through items
|
||||
* one-by-one. This value controls the threshold at which all nets are recalculated rather than
|
||||
* iterating over the items.
|
||||
*
|
||||
* Setting name: "NetInspectorBulkUpdateOptimisationThreshold"
|
||||
* Default value: 25
|
||||
*/
|
||||
int m_NetInspectorBulkUpdateOptimisationThreshold;
|
||||
|
||||
///@}
|
||||
|
||||
private:
|
||||
ADVANCED_CFG();
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <widgets/pcb_net_inspector_panel.h>
|
||||
#include <widgets/pcb_net_inspector_panel_data_model.h>
|
||||
|
||||
#include <advanced_config.h>
|
||||
#include <board_design_settings.h>
|
||||
#include <board_stackup_manager/board_stackup.h>
|
||||
#include <confirm.h>
|
||||
@ -982,7 +983,7 @@ void PCB_NET_INSPECTOR_PANEL::OnBoardItemsAdded( BOARD& aBoar
|
||||
return;
|
||||
|
||||
// Rebuild full netlist for large changes
|
||||
if( aBoardItems.size() > 25 )
|
||||
if( aBoardItems.size() > ADVANCED_CFG::GetCfg().m_NetInspectorBulkUpdateOptimisationThreshold )
|
||||
{
|
||||
buildNetsList();
|
||||
m_netsList->Refresh();
|
||||
@ -1064,7 +1065,7 @@ void PCB_NET_INSPECTOR_PANEL::OnBoardItemsRemoved( BOARD& aBo
|
||||
if( !IsShownOnScreen() )
|
||||
return;
|
||||
|
||||
if( aBoardItems.size() > 25 )
|
||||
if( aBoardItems.size() > ADVANCED_CFG::GetCfg().m_NetInspectorBulkUpdateOptimisationThreshold )
|
||||
{
|
||||
buildNetsList();
|
||||
m_netsList->Refresh();
|
||||
|
Loading…
Reference in New Issue
Block a user