Do not append "RESCUE" to symbol names when rescuing symbols.
Fixes lp:1741755 https://bugs.launchpad.net/kicad/+bug/1741755
This commit is contained in:
parent
c294a54c57
commit
43147a3a7a
|
@ -241,8 +241,6 @@ void RESCUE_CACHE_CANDIDATE::FindRescues( RESCUER& aRescuer,
|
|||
LIB_PART* lib_match = nullptr;
|
||||
wxString old_part_name;
|
||||
|
||||
wxString part_name_suffix = aRescuer.GetPartNameSuffix();
|
||||
|
||||
for( SCH_COMPONENT* each_component : *( aRescuer.GetComponents() ) )
|
||||
{
|
||||
wxString part_name = each_component->GetLibId().GetLibItemName();
|
||||
|
@ -268,9 +266,6 @@ void RESCUE_CACHE_CANDIDATE::FindRescues( RESCUER& aRescuer,
|
|||
// Check if the symbol has already been rescued.
|
||||
wxString new_name = LIB_ID::FixIllegalChars( part_name );
|
||||
|
||||
if( new_name.Find( part_name_suffix ) == wxNOT_FOUND )
|
||||
new_name += part_name_suffix;
|
||||
|
||||
RESCUE_CACHE_CANDIDATE candidate( part_name, new_name, cache_match, lib_match );
|
||||
|
||||
candidate_map[part_name] = candidate;
|
||||
|
@ -504,23 +499,6 @@ void RESCUER::UndoRescues()
|
|||
}
|
||||
|
||||
|
||||
wxString RESCUER::GetPartNameSuffix()
|
||||
{
|
||||
wxString suffix = wxT( "-RESCUE-" );
|
||||
wxString pname = GetPrj()->GetProjectName();
|
||||
|
||||
for( size_t i = 0; i < pname.Len(); ++i )
|
||||
{
|
||||
if( isspace( pname[i].GetValue() ) )
|
||||
suffix.Append( '_' );
|
||||
else
|
||||
suffix.Append( pname[i] );
|
||||
}
|
||||
|
||||
return suffix;
|
||||
}
|
||||
|
||||
|
||||
bool SCH_EDIT_FRAME::RescueLegacyProject( bool aRunningOnDemand )
|
||||
{
|
||||
LEGACY_RESCUER rescuer( *this, Prj() );
|
||||
|
|
|
@ -280,11 +280,6 @@ public:
|
|||
*/
|
||||
PROJECT* GetPrj() { return m_prj; }
|
||||
|
||||
/**
|
||||
* Return the suffix to add to rescued parts.
|
||||
*/
|
||||
wxString GetPartNameSuffix();
|
||||
|
||||
/**
|
||||
* Used by individual #RESCUE_CANDIDATE objects to log a rescue for undoing.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue