From 376332c3d4036e01fea9fde2a8c4c419e7e4545f Mon Sep 17 00:00:00 2001 From: david Date: Thu, 10 Jul 2008 16:00:39 +0000 Subject: [PATCH] =?UTF-8?q?uViewGridBase:=20liberaci=C3=B3n=20correcta=20e?= =?UTF-8?q?n=20m=C3=A9todo=20SaveGridStatus.=20uEditorGridBase:=20Mejorado?= =?UTF-8?q?=20el=20m=C3=A9todo=20RefrescarInterno.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@269 f4e31baf-9722-1c47-927c-6f952f962d4b --- Source/GUIBase/uEditorGridBase.pas | 10 +++------- Source/GUIBase/uViewGridBase.pas | 4 +++- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Source/GUIBase/uEditorGridBase.pas b/Source/GUIBase/uEditorGridBase.pas index dcfcdc2d..3ea6a720 100644 --- a/Source/GUIBase/uEditorGridBase.pas +++ b/Source/GUIBase/uEditorGridBase.pas @@ -283,21 +283,17 @@ begin end; procedure TfEditorGridBase.RefrescarInterno; -var - FocusedRow, TopRow : Integer; begin - TopRow := ViewGrid._FocusedView.Controller.TopRowIndex; - FocusedRow := ViewGrid._FocusedView.DataController.FocusedRowIndex; - ViewGrid._FocusedView.BeginUpdate; ShowHourglassCursor; + ViewGrid.SaveGridStatus; + ViewGrid._FocusedView.BeginUpdate; try // inherited; <- No hacemos lo que hay en el padre dsDataTable.DataTable.Refresh; finally ViewGrid._FocusedView.EndUpdate; - ViewGrid._FocusedView.DataController.FocusedRowIndex := FocusedRow; - ViewGrid._FocusedView.Controller.TopRowIndex := TopRow; + ViewGrid.RestoreGridStatus; HideHourglassCursor; end; end; diff --git a/Source/GUIBase/uViewGridBase.pas b/Source/GUIBase/uViewGridBase.pas index ea6b0574..ed072ad5 100644 --- a/Source/GUIBase/uViewGridBase.pas +++ b/Source/GUIBase/uViewGridBase.pas @@ -321,7 +321,9 @@ end; procedure TfrViewGridBase.SaveGridStatus; begin - FreeAndNil(FGridStatus); + if Assigned(FGridStatus) then + FreeAndNil(FGridStatus); + if not IsEmpty then FGridStatus := TcxGridStatus.Create(_FocusedView); end;