mirror of https://gitlab.com/basile.b/dexed.git
remove any invalid project from group after reloading
This commit is contained in:
parent
a6997859f0
commit
1be94f8095
|
@ -3075,11 +3075,9 @@ begin
|
||||||
fFreeProj := nil;
|
fFreeProj := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// TODO-cFIleOpenDialog: allow multi selection when possible
|
// TODO-cFileOpenDialog: allow multi selection when possible
|
||||||
//(open file, add file to project, ...)
|
//(open file, add file to project, ...)
|
||||||
|
|
||||||
// TODO-cprojectgroup: handle invalid projects filename when reloading a group
|
|
||||||
|
|
||||||
procedure TCEMainForm.actProjGroupCompileExecute(Sender: TObject);
|
procedure TCEMainForm.actProjGroupCompileExecute(Sender: TObject);
|
||||||
var
|
var
|
||||||
i: integer;
|
i: integer;
|
||||||
|
|
|
@ -7,7 +7,8 @@ uses
|
||||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, ExtCtrls, Menus,
|
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, ExtCtrls, Menus,
|
||||||
Buttons, dialogs, ComCtrls, StdCtrls,
|
Buttons, dialogs, ComCtrls, StdCtrls,
|
||||||
ce_widget, ce_common, ce_interfaces, ce_writableComponent, ce_observer,
|
ce_widget, ce_common, ce_interfaces, ce_writableComponent, ce_observer,
|
||||||
ce_nativeproject, ce_dubproject, ce_projutils, ce_sharedres, ce_dsgncontrols;
|
ce_nativeproject, ce_dubproject, ce_projutils, ce_sharedres, ce_dsgncontrols,
|
||||||
|
ce_dialogs;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
@ -219,9 +220,28 @@ begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TProjectGroup.afterLoad;
|
procedure TProjectGroup.afterLoad;
|
||||||
|
var
|
||||||
|
p: TProjectGroupItem;
|
||||||
|
i: integer;
|
||||||
|
b: boolean = false;
|
||||||
|
f: string = '';
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
fModified:=false;
|
for i:= projectCount-1 downto 0 do
|
||||||
|
begin
|
||||||
|
p := item[i];
|
||||||
|
p.fGroup := self;
|
||||||
|
if not p.absoluteFilename.fileExists then
|
||||||
|
begin
|
||||||
|
f += LineEnding + '"' + p.absoluteFilename + '"';
|
||||||
|
fItems.Delete(i);
|
||||||
|
b := true;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
fModified := b;
|
||||||
|
if b then
|
||||||
|
dlgOkError('the following projects are missing and are removed from the group:' + f,
|
||||||
|
'Project group error');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TProjectGroup.afterSave;
|
procedure TProjectGroup.afterSave;
|
||||||
|
|
Loading…
Reference in New Issue