mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-26 19:27:16 +01:00
MG: imroved error handling for renamed forms
git-svn-id: trunk@2743 -
This commit is contained in:
parent
68eb659398
commit
42bc75d034
16
ide/main.pp
16
ide/main.pp
@ -6127,6 +6127,9 @@ begin
|
|||||||
ApplyBossResult('Unable to rename form in source.'#13
|
ApplyBossResult('Unable to rename form in source.'#13
|
||||||
+'See messages.');
|
+'See messages.');
|
||||||
|
|
||||||
|
// rename form class
|
||||||
|
FormEditor1.JITFormList.RenameFormClass(TForm(AComponent),NewClassName);
|
||||||
|
|
||||||
// change createform statement
|
// change createform statement
|
||||||
if ActiveUnitInfo.IsPartOfProject and (Project1.MainUnit>=0)
|
if ActiveUnitInfo.IsPartOfProject and (Project1.MainUnit>=0)
|
||||||
then begin
|
then begin
|
||||||
@ -6134,12 +6137,12 @@ begin
|
|||||||
Project1.MainUnitInfo.Source,
|
Project1.MainUnitInfo.Source,
|
||||||
AComponent.ClassName,AComponent.Name,
|
AComponent.ClassName,AComponent.Name,
|
||||||
NewClassName,NewName,true);
|
NewClassName,NewName,true);
|
||||||
ApplyBossResult('Unable to change CreateForm statement.'#13
|
ApplyCodeToolChanges;
|
||||||
+'See messages.');
|
if not BossResult then begin
|
||||||
|
DoJumpToCodeToolBossError;
|
||||||
|
// don't raise an exception
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// rename form class
|
|
||||||
FormEditor1.JITFormList.RenameFormClass(TForm(AComponent),NewClassName);
|
|
||||||
|
|
||||||
end else begin
|
end else begin
|
||||||
if (aComponent is TMenuItem) or (aComponent is TMenu)
|
if (aComponent is TMenuItem) or (aComponent is TMenu)
|
||||||
@ -6645,6 +6648,9 @@ end.
|
|||||||
|
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.348 2002/08/23 11:33:03 lazarus
|
||||||
|
MG: imroved error handling for renamed forms
|
||||||
|
|
||||||
Revision 1.347 2002/08/23 11:24:41 lazarus
|
Revision 1.347 2002/08/23 11:24:41 lazarus
|
||||||
MG: implemented form renaming
|
MG: implemented form renaming
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user