mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 20:50:39 +02:00
IDE: DoAddActiveUnitToProject: ask to rename lowercase depending on settings
git-svn-id: trunk@22305 -
This commit is contained in:
parent
8a800ead9f
commit
aee969033e
12
ide/main.pp
12
ide/main.pp
@ -9316,6 +9316,18 @@ begin
|
||||
lisUnableToAddToProjectBecauseThereIsAlreadyAUnitWith, [s]),
|
||||
mtInformation, [mbOk], 0);
|
||||
end else begin
|
||||
if FilenameIsPascalUnit(ActiveUnitInfo.Filename)
|
||||
and (EnvironmentOptions.CharcaseFileAction<>ccfaIgnore) then
|
||||
begin
|
||||
// ask user to apply naming conventions
|
||||
Result:=DoRenameUnitLowerCase(ActiveUnitInfo,true);
|
||||
if Result=mrIgnore then Result:=mrOk;
|
||||
if Result<>mrOk then begin
|
||||
debugln('TMainIDE.DoAddActiveUnitToProject A DoRenameUnitLowerCase failed ',ActiveUnitInfo.Filename);
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
if MessageDlg(Format(lisAddToProject, [s]), mtConfirmation, [mbYes,
|
||||
mbCancel], 0) in [mrOk,mrYes]
|
||||
then begin
|
||||
|
Loading…
Reference in New Issue
Block a user