Cache entries are dependant on setting of aForceNoConnect
Don't use a result cached when aForceNoConnect was false when aForceNoConnect is true.
This commit is contained in:
parent
f5e35af1a5
commit
10c6e0bc46
|
@ -238,8 +238,13 @@ wxString SCH_PIN::GetDefaultNetName( const SCH_SHEET_PATH& aPath, bool aForceNoC
|
||||||
|
|
||||||
std::lock_guard<std::recursive_mutex> lock( m_netmap_mutex );
|
std::lock_guard<std::recursive_mutex> lock( m_netmap_mutex );
|
||||||
|
|
||||||
if( m_net_name_map.count( aPath ) > 0 )
|
auto it = m_net_name_map.find( aPath );
|
||||||
return m_net_name_map.at( aPath );
|
|
||||||
|
if( it != m_net_name_map.end() )
|
||||||
|
{
|
||||||
|
if( it->second.second == aForceNoConnect )
|
||||||
|
return it->second.first;
|
||||||
|
}
|
||||||
|
|
||||||
wxString name = "Net-(";
|
wxString name = "Net-(";
|
||||||
|
|
||||||
|
@ -260,7 +265,7 @@ wxString SCH_PIN::GetDefaultNetName( const SCH_SHEET_PATH& aPath, bool aForceNoC
|
||||||
name << "-Pad" << m_libPin->GetNumber() << ")";
|
name << "-Pad" << m_libPin->GetNumber() << ")";
|
||||||
|
|
||||||
if( annotated )
|
if( annotated )
|
||||||
m_net_name_map[ aPath ] = name;
|
m_net_name_map[ aPath ] = std::make_pair( name, aForceNoConnect );
|
||||||
|
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,8 +42,8 @@ class SCH_PIN : public SCH_ITEM
|
||||||
bool m_isDangling;
|
bool m_isDangling;
|
||||||
|
|
||||||
/// The name that this pin connection will drive onto a net
|
/// The name that this pin connection will drive onto a net
|
||||||
std::recursive_mutex m_netmap_mutex;
|
std::recursive_mutex m_netmap_mutex;
|
||||||
std::map<const SCH_SHEET_PATH, wxString> m_net_name_map;
|
std::map<const SCH_SHEET_PATH, std::pair<wxString, bool>> m_net_name_map;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SCH_PIN( LIB_PIN* aLibPin, SCH_COMPONENT* aParentSymbol );
|
SCH_PIN( LIB_PIN* aLibPin, SCH_COMPONENT* aParentSymbol );
|
||||||
|
|
Loading…
Reference in New Issue