Renaming a sheet's filename with only case changes causes false warning dialog
Description
A warning dialog is shown when attempting to rename an existing sheet with case (capitalization) changes only:
This dialog is wrong, because it is comparing the old and the new names of the sheet. It should exclude the old name of the sheet, which will no longer exist after the rename.
Additionally, the dialog's action buttons are confusingly-worded, because this dialog was originally created only with the "Create New Sheet" action in mind, even though it can also be triggered by renaming an existing sheet. The button labels and dialog text should be adapted for the "rename existing sheet" case.
Steps to reproduce
- Edit the properties for a sheet
- Change its filename (capitalization only)
- Press OK
KiCad Version
Application: KiCad Schematic Editor arm64 on arm64
Version: 8.0.2-25-gf15551a6b5, release build
Libraries:
wxWidgets 3.2.4
FreeType 2.13.2
HarfBuzz 8.3.0
FontConfig 2.15.0
Platform: macOS Sonoma Version 14.4.1 (Build 23E224), 64 bit, Little endian, wxMac
wxWidgets: 3.2.4 (wchar_t,wx containers)
Boost: 1.84.0
OCC: 7.7.2
Curl: 7.87.0
ngspice: 42
Compiler: Clang 14.0.3 with C++ ABI 1002
Build settings: