mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-23 20:19:42 +01:00
MG: fixed return polygon point
git-svn-id: trunk@2830 -
This commit is contained in:
parent
07a9e5a4d9
commit
59acf2c336
20
ide/main.pp
20
ide/main.pp
@ -387,7 +387,7 @@ type
|
|||||||
|
|
||||||
// files/units
|
// files/units
|
||||||
function DoNewEditorFile(NewUnitType:TNewUnitType;
|
function DoNewEditorFile(NewUnitType:TNewUnitType;
|
||||||
NewFilename: string):TModalResult;
|
NewFilename: string; NewFlags: TNewFlags):TModalResult;
|
||||||
function DoSaveEditorFile(PageIndex:integer;
|
function DoSaveEditorFile(PageIndex:integer;
|
||||||
Flags: TSaveFlags): TModalResult;
|
Flags: TSaveFlags): TModalResult;
|
||||||
function DoCloseEditorFile(PageIndex:integer;
|
function DoCloseEditorFile(PageIndex:integer;
|
||||||
@ -1497,12 +1497,12 @@ end;
|
|||||||
|
|
||||||
procedure TMainIDE.mnuNewUnitClicked(Sender : TObject);
|
procedure TMainIDE.mnuNewUnitClicked(Sender : TObject);
|
||||||
begin
|
begin
|
||||||
DoNewEditorFile(nuUnit,'');
|
DoNewEditorFile(nuUnit,'',[]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainIDE.mnuNewFormClicked(Sender : TObject);
|
procedure TMainIDE.mnuNewFormClicked(Sender : TObject);
|
||||||
begin
|
begin
|
||||||
DoNewEditorFile(nuForm,'');
|
DoNewEditorFile(nuForm,'',[]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainIDE.mnuOpenClicked(Sender : TObject);
|
procedure TMainIDE.mnuOpenClicked(Sender : TObject);
|
||||||
@ -2989,9 +2989,9 @@ begin
|
|||||||
begin
|
begin
|
||||||
// create new file
|
// create new file
|
||||||
if FilenameIsPascalSource(AFilename) then
|
if FilenameIsPascalSource(AFilename) then
|
||||||
Result:=DoNewEditorFile(nuUnit,AFilename)
|
Result:=DoNewEditorFile(nuUnit,AFilename,[])
|
||||||
else
|
else
|
||||||
Result:=DoNewEditorFile(nuEmpty,AFilename);
|
Result:=DoNewEditorFile(nuEmpty,AFilename,[]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -3532,7 +3532,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function TMainIDE.DoNewEditorFile(NewUnitType:TNewUnitType;
|
function TMainIDE.DoNewEditorFile(NewUnitType:TNewUnitType;
|
||||||
NewFilename: string):TModalResult;
|
NewFilename: string; NewFlags: TNewFlags):TModalResult;
|
||||||
var NewUnitInfo:TUnitInfo;
|
var NewUnitInfo:TUnitInfo;
|
||||||
NewSrcEdit: TSourceEditor;
|
NewSrcEdit: TSourceEditor;
|
||||||
NewUnitName: string;
|
NewUnitName: string;
|
||||||
@ -3558,7 +3558,8 @@ begin
|
|||||||
// add to project
|
// add to project
|
||||||
with NewUnitInfo do begin
|
with NewUnitInfo do begin
|
||||||
Loaded:=true;
|
Loaded:=true;
|
||||||
IsPartOfProject:=Project1.FileIsInProjectDir(NewFilename);
|
IsPartOfProject:=(nfIsPartOfProject in NewFlags)
|
||||||
|
or Project1.FileIsInProjectDir(NewFilename);
|
||||||
end;
|
end;
|
||||||
Project1.AddUnit(NewUnitInfo,(NewUnitType in [nuForm, nuUnit])
|
Project1.AddUnit(NewUnitInfo,(NewUnitType in [nuForm, nuUnit])
|
||||||
and NewUnitInfo.IsPartOfProject);
|
and NewUnitInfo.IsPartOfProject);
|
||||||
@ -4263,7 +4264,7 @@ writeln('TMainIDE.DoNewProject A');
|
|||||||
+';'+
|
+';'+
|
||||||
'$(LazarusDir)'+ds+'lcl'+ds+'interfaces'+ds+'$(LCLWidgetType)';
|
'$(LazarusDir)'+ds+'lcl'+ds+'interfaces'+ds+'$(LCLWidgetType)';
|
||||||
// create a first form unit
|
// create a first form unit
|
||||||
DoNewEditorFile(nuForm,'');
|
DoNewEditorFile(nuForm,'',[nfIsPartOfProject]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
ptProgram,ptCustomProgram:
|
ptProgram,ptCustomProgram:
|
||||||
@ -7439,6 +7440,9 @@ end.
|
|||||||
|
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.421 2002/10/31 17:31:08 lazarus
|
||||||
|
MG: fixed return polygon point
|
||||||
|
|
||||||
Revision 1.420 2002/10/30 22:28:47 lazarus
|
Revision 1.420 2002/10/30 22:28:47 lazarus
|
||||||
MG: fixed used virtual files and IsPartOfProject Bug
|
MG: fixed used virtual files and IsPartOfProject Bug
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user