upstream fix, grouped project reloaded as FSP after saving project file from an editor

This commit is contained in:
Basile Burg 2016-10-06 19:01:18 +02:00
parent 4bd3e09d78
commit f2de2bacff
No known key found for this signature in database
GPG Key ID: 1868039F415CB8CF
4 changed files with 18 additions and 2 deletions

View File

@ -116,6 +116,7 @@ type
function binaryKind: TProjectBinaryKind;
function getCommandLine: string;
function outputFilename: string;
procedure reload;
//
function isSource(const fname: string): boolean;
function sourcesCount: integer;
@ -349,6 +350,12 @@ begin
exit(fBasePath);
end;
procedure TCEDubProject.reload;
begin
if fFilename.fileExists then
loadFromFile(fFilename);
end;
procedure TCEDubProject.loadFromFile(const fname: string);
var
loader: TMemoryStream;

View File

@ -43,6 +43,8 @@ type
procedure loadFromFile(const fname: string);
// saves project to filename
procedure saveToFile(const fname: string);
// reloads from filename
procedure reload;
// indicates of the project is modified (should be saved or not)
function modified: boolean;
// returns the base path used to solve relative locations

View File

@ -1430,6 +1430,7 @@ begin
topsplt := nil;
end;
fSymlWidg.showWidget;
// TODO-cdocking: Put the new unified project editors and inspectors to the right once done
// right
DockMaster.GetAnchorSite(fProjWidg).Width := 190;
DockMaster.GetAnchorSite(fPrjCfWidg).Width := 190;
@ -3209,9 +3210,8 @@ begin
if checkProjectLock then exit;
//
fname := fProject.filename;
fProject.getProject.Free;
document.saveToFile(fname);
openProj(fname);
fProject.reload;
end;
function TCEMainForm.closeProj: boolean;

View File

@ -103,6 +103,7 @@ type
function binaryKind: TProjectBinaryKind;
function getCommandLine: string;
function modified: boolean;
procedure reload;
//
function configurationCount: integer;
procedure setActiveConfigurationIndex(index: integer);
@ -251,6 +252,12 @@ begin
endUpdate;
end;
procedure TCENativeProject.reload;
begin
if fFilename.fileExists then
loadFromFile(fFilename);
end;
procedure TCENativeProject.customLoadFromFile(const fname: string);
begin
fbasePath := fname.extractFilePath;