Update conn minor check to use Advanced Config
This commit is contained in:
parent
74998790e8
commit
9f2c9636f0
|
@ -112,6 +112,7 @@ static const wxChar TriangulateMinimumArea[] = wxT( "TriangulateMinimumArea" );
|
||||||
static const wxChar EnableCacheFriendlyFracture[] = wxT( "EnableCacheFriendlyFracture" );
|
static const wxChar EnableCacheFriendlyFracture[] = wxT( "EnableCacheFriendlyFracture" );
|
||||||
static const wxChar EnableAPILogging[] = wxT( "EnableAPILogging" );
|
static const wxChar EnableAPILogging[] = wxT( "EnableAPILogging" );
|
||||||
static const wxChar MaxFileSystemWatchers[] = wxT( "MaxFileSystemWatchers" );
|
static const wxChar MaxFileSystemWatchers[] = wxT( "MaxFileSystemWatchers" );
|
||||||
|
static const wxChar MinorSchematicGraphSize[] = wxT( "MinorSchematicGraphSize" );
|
||||||
} // namespace KEYS
|
} // namespace KEYS
|
||||||
|
|
||||||
|
|
||||||
|
@ -268,6 +269,8 @@ ADVANCED_CFG::ADVANCED_CFG()
|
||||||
|
|
||||||
m_MaxFilesystemWatchers = 16384;
|
m_MaxFilesystemWatchers = 16384;
|
||||||
|
|
||||||
|
m_MinorSchematicGraphSize = 10000;
|
||||||
|
|
||||||
loadFromConfigFile();
|
loadFromConfigFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -494,6 +497,10 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
|
||||||
&m_MaxFilesystemWatchers, m_MaxFilesystemWatchers,
|
&m_MaxFilesystemWatchers, m_MaxFilesystemWatchers,
|
||||||
0, 2147483647 ) );
|
0, 2147483647 ) );
|
||||||
|
|
||||||
|
configParams.push_back( new PARAM_CFG_INT( true, AC_KEYS::MinorSchematicGraphSize,
|
||||||
|
&m_MinorSchematicGraphSize, m_MinorSchematicGraphSize,
|
||||||
|
0, 2147483647 ) );
|
||||||
|
|
||||||
// Special case for trace mask setting...we just grab them and set them immediately
|
// Special case for trace mask setting...we just grab them and set them immediately
|
||||||
// Because we even use wxLogTrace inside of advanced config
|
// Because we even use wxLogTrace inside of advanced config
|
||||||
wxString traceMasks;
|
wxString traceMasks;
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#include <sch_connection.h>
|
#include <sch_connection.h>
|
||||||
#include <sch_item.h>
|
#include <sch_item.h>
|
||||||
#include <wx/treectrl.h>
|
#include <wx/treectrl.h>
|
||||||
|
#include <advanced_config.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
@ -481,7 +482,8 @@ public:
|
||||||
*/
|
*/
|
||||||
bool IsMinor() const
|
bool IsMinor() const
|
||||||
{
|
{
|
||||||
return m_items.size() < 10000;
|
return static_cast<ssize_t>( m_items.size() )
|
||||||
|
< ADVANCED_CFG::GetCfg().m_MinorSchematicGraphSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -590,6 +590,15 @@ public:
|
||||||
*/
|
*/
|
||||||
int m_MaxFilesystemWatchers;
|
int m_MaxFilesystemWatchers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the number of items in a schematic graph for it to be considered "minor"
|
||||||
|
*
|
||||||
|
* Setting name: "MinorSchematicGraphSize"
|
||||||
|
* Valid values: 0 to 2147483647
|
||||||
|
* Default value: 10000
|
||||||
|
*/
|
||||||
|
int m_MinorSchematicGraphSize;
|
||||||
|
|
||||||
///@}
|
///@}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in New Issue