Fix renaming sheet check
If we are renaming a sheet that exists only once in the schematic, then we don't need to warn about case sensitivity. If the sheet exists multiple times, we do. We can't check this using SCREENS because the screens don't maintain full state information about where they are used. Fixes https://gitlab.com/kicad/code/kicad/-/issues/17901
This commit is contained in:
parent
44717f927c
commit
ba4974749c
|
@ -502,7 +502,7 @@ bool DIALOG_SHEET_PROPERTIES::onSheetFilenameChanged( const wxString& aNewFilena
|
|||
|
||||
if( m_sheet->GetScreen() == nullptr ) // New just created sheet.
|
||||
{
|
||||
if( !m_frame->AllowCaseSensitiveFileNameClashes( newAbsoluteFilename ) )
|
||||
if( !m_frame->AllowCaseSensitiveFileNameClashes( m_sheet->GetFileName(), newAbsoluteFilename ) )
|
||||
return false;
|
||||
|
||||
if( |