mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-21 12:09:30 +01:00
MWE: Fixed close confirmation on changed designer form
([Yes][No][Cancel] instead of [Yes][Cancel][Abort]) git-svn-id: trunk@3079 -
This commit is contained in:
parent
7ba2d1fab6
commit
c233d1a573
28
ide/main.pp
28
ide/main.pp
@ -8142,16 +8142,20 @@ var
|
|||||||
begin
|
begin
|
||||||
ADesigner:=TDesigner(Sender);
|
ADesigner:=TDesigner(Sender);
|
||||||
GetDesignerUnit(ADesigner,ASrcEdit,AnUnitInfo);
|
GetDesignerUnit(ADesigner,ASrcEdit,AnUnitInfo);
|
||||||
if AnUnitInfo.NeedsSaveToDisk then begin
|
if AnUnitInfo.NeedsSaveToDisk
|
||||||
if MessageDlg('Save changes?',
|
then begin
|
||||||
'Save file "'+AnUnitInfo.Filename+'"'#13
|
case MessageDlg('Save changes?',
|
||||||
+'before closing form "'+ADesigner.LookupRoot.Name+'"?',
|
'Save file "'+AnUnitInfo.Filename+'"'#13
|
||||||
mtConfirmation,[mbYes,mbCancel,mbAbort],0)<>mrYes
|
+'before closing form "'+ADesigner.LookupRoot.Name+'"?',
|
||||||
then
|
mtConfirmation,[mbYes,mbNo,mbCancel],0) of
|
||||||
exit;
|
mrYes: begin
|
||||||
if DoSaveEditorFile(AnUnitInfo.EditorIndex,[sfCheckAmbigiousFiles])<>mrOk
|
if DoSaveEditorFile(AnUnitInfo.EditorIndex,[sfCheckAmbigiousFiles])<>mrOk
|
||||||
then
|
then Exit;
|
||||||
exit;
|
end;
|
||||||
|
mrNo:;
|
||||||
|
else
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
CloseDesignerForm(AnUnitInfo);
|
CloseDesignerForm(AnUnitInfo);
|
||||||
end;
|
end;
|
||||||
@ -9022,6 +9026,10 @@ end.
|
|||||||
|
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.596 2003/06/03 23:45:26 marc
|
||||||
|
MWE: Fixed close confirmation on changed designer form
|
||||||
|
([Yes][No][Cancel] instead of [Yes][Cancel][Abort])
|
||||||
|
|
||||||
Revision 1.595 2003/06/03 16:12:14 mattias
|
Revision 1.595 2003/06/03 16:12:14 mattias
|
||||||
fixed loading bookmarks for editor index 0
|
fixed loading bookmarks for editor index 0
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user