mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-02 17:10:34 +02:00
* fix bug #1632
This commit is contained in:
parent
2fc53dd015
commit
bd69204343
@ -1831,15 +1831,29 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function TFileEditor.SaveAs: Boolean;
|
function TFileEditor.SaveAs: Boolean;
|
||||||
|
var
|
||||||
|
SavedName : String;
|
||||||
|
SavedDiskLoadTime : longint;
|
||||||
begin
|
begin
|
||||||
SaveAs := False;
|
SaveAs := False;
|
||||||
|
SavedName:=FileName;
|
||||||
|
SavedDiskLoadTime:=OnDiskLoadTime;
|
||||||
if EditorDialog(edSaveAs, @FileName) <> cmCancel then
|
if EditorDialog(edSaveAs, @FileName) <> cmCancel then
|
||||||
begin
|
begin
|
||||||
FileName := FExpand(FileName);
|
FileName:=FExpand(FileName);
|
||||||
Message(Owner, evBroadcast, cmUpdateTitle, @Self);
|
Message(Owner, evBroadcast, cmUpdateTitle, @Self);
|
||||||
{ if we rename the file the OnDiskLoadTime is wrong so we reset it }
|
{ if we rename the file the OnDiskLoadTime is wrong so we reset it }
|
||||||
OnDiskLoadTime:=-1;
|
OnDiskLoadTime:=-1;
|
||||||
SaveAs := SaveFile;
|
if SaveFile then
|
||||||
|
begin
|
||||||
|
SaveAs := true;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
FileName:=SavedName;
|
||||||
|
OnDiskLoadTime:=SavedDiskLoadTime;
|
||||||
|
Message(Owner, evBroadcast, cmUpdateTitle, @Self);
|
||||||
|
end;
|
||||||
if IsClipboard then FileName := '';
|
if IsClipboard then FileName := '';
|
||||||
Message(Application,evBroadcast,cmFileNameChanged,@Self);
|
Message(Application,evBroadcast,cmFileNameChanged,@Self);
|
||||||
end;
|
end;
|
||||||
@ -1992,7 +2006,10 @@ end;
|
|||||||
END.
|
END.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.5 2001-09-27 22:32:24 pierre
|
Revision 1.6 2001-10-10 23:34:54 pierre
|
||||||
|
* fix bug 1632
|
||||||
|
|
||||||
|
Revision 1.5 2001/09/27 22:32:24 pierre
|
||||||
* avoid to get unnecessary warnings about modified files if file already open
|
* avoid to get unnecessary warnings about modified files if file already open
|
||||||
|
|
||||||
Revision 1.4 2001/09/14 23:47:08 pierre
|
Revision 1.4 2001/09/14 23:47:08 pierre
|
||||||
|
Loading…
Reference in New Issue
Block a user