You've already forked lazarus-ccr
tvplanit: Fix duplicate resource error when editing a resource.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8941 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -241,10 +241,13 @@ begin
|
||||
end;
|
||||
|
||||
function TResEditForm.ValidData(out AControl: TWinControl; out AMsg: String): Boolean;
|
||||
var
|
||||
res: TVpResource;
|
||||
begin
|
||||
Result := false;
|
||||
|
||||
if FDatastore.FindResource(DescriptionEdit.Text) <> nil then
|
||||
|
||||
res := FDataStore.FindResource(DescriptionEdit.Text);
|
||||
if (res <> nil) and (res <> Resource) then
|
||||
begin
|
||||
AControl := DescriptionEdit;
|
||||
AMsg := RSDuplicateResource;
|
||||
@ -253,7 +256,6 @@ begin
|
||||
|
||||
Result := true;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TResEditForm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
@ -276,8 +278,6 @@ begin
|
||||
end;
|
||||
{=====}
|
||||
|
||||
{=====}
|
||||
|
||||
procedure TResEditForm.FormShow(Sender: TObject);
|
||||
begin
|
||||
DescriptionEdit.SetFocus;
|
||||
|
Reference in New Issue
Block a user