Skip to content

Commit

Permalink
Lentidao excessiva na exportacao de projeto
Browse files Browse the repository at this point in the history
A opcao de sugerir associacoes automaticamente na troca de versiculo
nao estava sendo desativada durante exportacoes, causando lentidao.
  • Loading branch information
rubiot committed Jan 21, 2017
1 parent fb79305 commit 3cdc1ee
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions projeto.pas
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ TProjeto = class
private
FMemoVersiculo: TMemoVersiculo;
FAtivo: boolean;
FExportando: boolean;
FOnAlterarVersiculo: TOnAlterarVersiculoEvent;
FSugerirAssociacaoAuto: boolean;
FExibirDefComCtrl: boolean;
Expand Down Expand Up @@ -1322,31 +1323,31 @@ procedure TProjeto.VersiculoSeguinte;
begin
if not FTblPares.EOF then
FTblPares.Next;
if SugerirAssociacaoAutomaticamente and (FRadioGroupSituacao.ItemIndex = 0) then
if not FExportando and SugerirAssociacaoAutomaticamente and (FRadioGroupSituacao.ItemIndex = 0) then
SugerirAssociacao;
end;

procedure TProjeto.VersiculoAnterior;
begin
if not FTblPares.BOF then
FTblPares.Prior;
if SugerirAssociacaoAutomaticamente and (FRadioGroupSituacao.ItemIndex = 0) then
if not FExportando and SugerirAssociacaoAutomaticamente and (FRadioGroupSituacao.ItemIndex = 0) then
SugerirAssociacao;
end;

procedure TProjeto.VersiculoInicial;
begin
if not FTblPares.BOF then
FTblPares.First;
if SugerirAssociacaoAutomaticamente and (FRadioGroupSituacao.ItemIndex = 0) then
if not FExportando and SugerirAssociacaoAutomaticamente and (FRadioGroupSituacao.ItemIndex = 0) then
SugerirAssociacao;
end;

procedure TProjeto.VersiculoFinal;
begin
if not FTblPares.EOF then
FTblPares.Last;
if SugerirAssociacaoAutomaticamente and (FRadioGroupSituacao.ItemIndex = 0) then
if not FExportando and SugerirAssociacaoAutomaticamente and (FRadioGroupSituacao.ItemIndex = 0) then
SugerirAssociacao;
end;

Expand Down Expand Up @@ -1627,6 +1628,7 @@ procedure TProjeto.ExportarTextoDestinoComStrongs(arquivo: string;
end;
FAVersiculo[tbOrigem].Ativo := false;
FAVersiculo[tbDestino].Ativo := false;
FExportando := true;
ONT := TStringList.Create;
PreRolagemVersiculo(nil);

Expand Down Expand Up @@ -1691,6 +1693,7 @@ procedure TProjeto.ExportarTextoDestinoComStrongs(arquivo: string;
ONT.Destroy;
FAVersiculo[tbOrigem].Ativo := true;
FAVersiculo[tbDestino].Ativo := true;
FExportando := false;
PosRolagemVersiculo(nil);
if assigned(pb) then
pb.Visible := false;
Expand Down Expand Up @@ -1722,6 +1725,7 @@ procedure TProjeto.ExportarTextoInterlinear(arquivo: string;
end;
FAVersiculo[tbOrigem].Ativo := false;
FAVersiculo[tbDestino].Ativo := false;
FExportando := true;
ONT := TStringList.Create;
PreRolagemVersiculo(nil);

Expand Down Expand Up @@ -1774,6 +1778,7 @@ procedure TProjeto.ExportarTextoInterlinear(arquivo: string;
ONT.Destroy;
FAVersiculo[tbOrigem].Ativo := true;
FAVersiculo[tbDestino].Ativo := true;
FExportando := false;
PosRolagemVersiculo(nil);
if assigned(pb) then
pb.Visible := false;
Expand Down Expand Up @@ -1829,6 +1834,7 @@ procedure TProjeto.ExportarConcordancia(arquivo: string;

FAVersiculo[tbOrigem].Ativo := false;
FAVersiculo[tbDestino].Ativo := false;
FExportando := true;
PreRolagemVersiculo(nil);

DesabilitarEventosRolagem;
Expand Down Expand Up @@ -1878,6 +1884,7 @@ procedure TProjeto.ExportarConcordancia(arquivo: string;
Concordancia.Free;
FAVersiculo[tbOrigem].Ativo := true;
FAVersiculo[tbDestino].Ativo := true;
FExportando := false;
IrPara(marcador);
HabilitarEventosRolagem;
PosRolagemVersiculo(nil);
Expand Down

0 comments on commit 3cdc1ee

Please sign in to comment.