Prevent warning when renaming sheet name

Renaming a subsheet but keeping the filename should not present a
warning to the user.  The was triggered due to comparing a
fully-qualified filename to a relative filename.

Fixes: lp:1744475
* https://bugs.launchpad.net/kicad/+bug/1744475
This commit is contained in:
Seth Hillbrand 2018-03-29 13:48:14 -07:00
parent 4917540069
commit 7c70e969db
1 changed files with 4 additions and 1 deletions

View File

@ -169,7 +169,10 @@ bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy )
// to avoid issues under Windows, although under Unix
// filenames are case sensitive.
// But many users create schematic under both Unix and Windows
if( newFilename.CmpNoCase( aSheet->GetFileName() ) != 0 )
// **
// N.B. aSheet->GetFileName() will return a relative path
// aSheet->GetScreen()->GetFileName() returns a full path
if( newFilename.CmpNoCase( aSheet->GetScreen()->GetFileName() ) != 0 )
{
// Sheet file name changes cannot be undone.
isUndoable = false;