Restore vertical and horizontal scroll offset in table list after refreshing. Fixes issue #3379.

This commit is contained in:
Ansgar Becker
2013-10-12 05:20:58 +00:00
parent 6976f5a4e6
commit 2b83aeafcb

View File

@@ -4881,6 +4881,7 @@ var
Msg: String;
vt: TVirtualStringTree;
Conn: TDBConnection;
ScrollOffset: TPoint;
begin
// DB-Properties
vt := Sender as TVirtualStringTree;
@@ -4889,6 +4890,7 @@ begin
LogSQL('ListTablesBeforePaint', lcDebug);
Screen.Cursor := crHourGlass;
Conn := ActiveConnection;
ScrollOffset := vt.OffsetXY;
vt.BeginUpdate;
vt.Clear;
Msg := '';
@@ -4928,6 +4930,7 @@ begin
Msg := Msg + ')';
end;
end;
vt.OffsetXY := ScrollOffset;
vt.EndUpdate;
vt.Tag := VTREE_LOADED;
ShowStatusMsg(Msg, 0);