Eeschema: do not change schematic UUID on file overwrite.
This commit is contained in:
parent
df186a2049
commit
866c58a6d6
|
@ -65,6 +65,7 @@ bool SCH_EDIT_FRAME::SaveEEFile( SCH_SHEET* aSheet, bool aSaveUnderNewName )
|
||||||
{
|
{
|
||||||
wxString msg;
|
wxString msg;
|
||||||
wxFileName schematicFileName;
|
wxFileName schematicFileName;
|
||||||
|
wxFileName oldFileName;
|
||||||
bool success;
|
bool success;
|
||||||
|
|
||||||
if( aSheet == NULL )
|
if( aSheet == NULL )
|
||||||
|
@ -80,6 +81,7 @@ bool SCH_EDIT_FRAME::SaveEEFile( SCH_SHEET* aSheet, bool aSaveUnderNewName )
|
||||||
|
|
||||||
// Construct the name of the file to be saved
|
// Construct the name of the file to be saved
|
||||||
schematicFileName = Prj().AbsolutePath( screen->GetFileName() );
|
schematicFileName = Prj().AbsolutePath( screen->GetFileName() );
|
||||||
|
oldFileName = schematicFileName;
|
||||||
|
|
||||||
if( aSaveUnderNewName )
|
if( aSaveUnderNewName )
|
||||||
{
|
{
|
||||||
|
@ -110,7 +112,7 @@ bool SCH_EDIT_FRAME::SaveEEFile( SCH_SHEET* aSheet, bool aSaveUnderNewName )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// This is a new schematic file so make sure it has a unique ID.
|
// This is a new schematic file so make sure it has a unique ID.
|
||||||
if( aSaveUnderNewName )
|
if( aSaveUnderNewName && schematicFileName != oldFileName )
|
||||||
screen->AssignNewUuid();
|
screen->AssignNewUuid();
|
||||||
|
|
||||||
wxFileName tempFile( schematicFileName );
|
wxFileName tempFile( schematicFileName );
|
||||||
|
|
Loading…
Reference in New Issue