Commit 5dd19c72 authored by Jucelino Fonseca's avatar Jucelino Fonseca

ajustes

parent 01e2f5b7
......@@ -736,6 +736,7 @@ var lClassTicketCurrent,
lEnumerator : acEnumerator;
li,
li_Pos : integer;
ls_ant_objeto,
ls_aux,
ls_Objeto : string;
lRelationTicket : acRelationTicket;
......@@ -774,11 +775,14 @@ begin
lClassTicketCurrent := self.MetaModel.GetClassTicketByName(ls_Objeto);
while li_Pos > 0 do
begin
ls_aux := trim(Copy(ls_aux,li_Pos +1,Length(ls_aux)));
ls_ant_objeto := ls_aux;
li_Pos := Pos ('.',ls_aux);
ls_Objeto := trim(Copy(ls_aux,0,li_Pos -1));
if Assigned(lClassTicketCurrent) and (ls_Objeto <> '') then
begin
lbAchei := false;
for li := 0 to pred(lClassTicketCurrent.RelationTicketsIn.Count) do
begin
......@@ -786,6 +790,7 @@ begin
if SameText(lRelationTicket.DestinationPropertyName, ls_Objeto) then
begin
lClassTicketAux := lRelationTicket.OriginClassTicket;
ls_ant_objeto := '';
lbAchei := true;
break;
end;
......@@ -798,6 +803,7 @@ begin
if SameText(lRelationTicket.OriginPropertyName, ls_Objeto) then
begin
lClassTicketAux := lRelationTicket.DestinationClassTicket;
ls_ant_objeto := '';
break;
end;
end;
......@@ -809,6 +815,7 @@ begin
if Assigned(lClassTicketCurrent) then
begin
//ShowMessage(ls_ant_objeto);
if piAceitaAtributo then
begin
for li := 0 to pred(lClassTicketCurrent.Attributes.Count) do
......@@ -816,7 +823,9 @@ begin
lAttributeTicket := acAttributeTicket(lClassTicketCurrent.Attributes.Objects[li]);
if lAttributeTicket.Stereotype = acAttributeStereotype.pvPersistent then
begin
piLista.Add(lAttributeTicket.AttributeName);
if BuscaParcial(ls_ant_objeto,lAttributeTicket.AttributeName) then
piLista.Add(lAttributeTicket.AttributeName);
end;
end;
end;
......@@ -824,14 +833,20 @@ begin
begin
lRelationTicket := acRelationTicket(lClassTicketCurrent.RelationTicketsIn.Objects[li]);
if trim(lRelationTicket.DestinationPropertyName) <> '' then
piLista.Add(lRelationTicket.DestinationPropertyName);
begin
if BuscaParcial(ls_ant_objeto,lRelationTicket.DestinationPropertyName) then
piLista.Add(lRelationTicket.DestinationPropertyName);
end;
end;
for li := 0 to pred(lClassTicketCurrent.RelationTicketsOut.Count) do
begin
lRelationTicket := acRelationTicket(lClassTicketCurrent.RelationTicketsOut.Objects[li]);
if trim(lRelationTicket.OriginPropertyName) <> '' then
piLista.Add(lRelationTicket.OriginPropertyName);
begin
if BuscaParcial(ls_ant_objeto,lRelationTicket.OriginPropertyName) then
piLista.Add(lRelationTicket.OriginPropertyName);
end;
end;
end;
end;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment