mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-26 15:00:26 +02:00
LCL, dbgrid debug log
git-svn-id: trunk@40499 -
This commit is contained in:
parent
bc9348a60f
commit
84561b710d
@ -808,7 +808,7 @@ end;
|
|||||||
procedure TCustomDBGrid.OnDataSetChanged(aDataSet: TDataSet);
|
procedure TCustomDBGrid.OnDataSetChanged(aDataSet: TDataSet);
|
||||||
begin
|
begin
|
||||||
{$Ifdef dbgDBGrid}
|
{$Ifdef dbgDBGrid}
|
||||||
DebugLn('(%s) TCustomDBDrid.OnDataSetChanged(aDataSet=%s) INIT',[name,dbgsname(ADataset)]);
|
DebugLnEnter('(%s) TCustomDBDrid.OnDataSetChanged(aDataSet=%s) INIT',[name,dbgsname(ADataset)]);
|
||||||
{$endif}
|
{$endif}
|
||||||
if not (gsStartEditing in FGridStatus) then begin
|
if not (gsStartEditing in FGridStatus) then begin
|
||||||
if EditorMode then
|
if EditorMode then
|
||||||
@ -822,21 +822,21 @@ begin
|
|||||||
EditorMode := true;
|
EditorMode := true;
|
||||||
end;
|
end;
|
||||||
{$Ifdef dbgDBGrid}
|
{$Ifdef dbgDBGrid}
|
||||||
DebugLn('(%s) TCustomDBDrid.OnDataSetChanged(aDataSet=%s) DONE',[name,dbgsname(ADataset)]);
|
DebugLnExit('(%s) TCustomDBDrid.OnDataSetChanged(aDataSet=%s) DONE',[name,dbgsname(ADataset)]);
|
||||||
{$endif}
|
{$endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomDBGrid.OnDataSetOpen(aDataSet: TDataSet);
|
procedure TCustomDBGrid.OnDataSetOpen(aDataSet: TDataSet);
|
||||||
begin
|
begin
|
||||||
{$Ifdef dbgDBGrid}
|
{$Ifdef dbgDBGrid}
|
||||||
DebugLn('(%s) TCustomDBDrid.OnDataSetOpen INIT',[name]);
|
DebugLnEnter('(%s) TCustomDBDrid.OnDataSetOpen INIT',[name]);
|
||||||
{$endif}
|
{$endif}
|
||||||
RenewColWidths;
|
RenewColWidths;
|
||||||
LinkActive(True);
|
LinkActive(True);
|
||||||
UpdateActive;
|
UpdateActive;
|
||||||
SelectEditor;
|
SelectEditor;
|
||||||
{$Ifdef dbgDBGrid}
|
{$Ifdef dbgDBGrid}
|
||||||
DebugLn('(%s) TCustomDBDrid.OnDataSetOpen DONE',[name]);
|
DebugLnExit('(%s) TCustomDBDrid.OnDataSetOpen DONE',[name]);
|
||||||
{$endif}
|
{$endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -889,14 +889,14 @@ end;
|
|||||||
procedure TCustomDBGrid.OnNewDataSet(aDataSet: TDataset);
|
procedure TCustomDBGrid.OnNewDataSet(aDataSet: TDataset);
|
||||||
begin
|
begin
|
||||||
{$Ifdef dbgDBGrid}
|
{$Ifdef dbgDBGrid}
|
||||||
DebugLn('(%s) TCustomDBDrid.OnNewDataset INIT',[name]);
|
DebugLnEnter('(%s) TCustomDBDrid.OnNewDataset INIT',[name]);
|
||||||
{$endif}
|
{$endif}
|
||||||
RenewColWidths;
|
RenewColWidths;
|
||||||
LinkActive(True);
|
LinkActive(True);
|
||||||
UpdateActive;
|
UpdateActive;
|
||||||
SelectEditor;
|
SelectEditor;
|
||||||
{$Ifdef dbgDBGrid}
|
{$Ifdef dbgDBGrid}
|
||||||
DebugLn('(%s) TCustomDBDrid.OnNewDataset DONE',[name]);
|
DebugLnExit('(%s) TCustomDBDrid.OnNewDataset DONE',[name]);
|
||||||
{$endif}
|
{$endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1533,13 +1533,14 @@ procedure TCustomDBGrid.doLayoutChanged;
|
|||||||
begin
|
begin
|
||||||
if csDestroying in ComponentState then
|
if csDestroying in ComponentState then
|
||||||
exit;
|
exit;
|
||||||
{$ifdef dbgDBGrid} DebugLn('doLayoutChanged INIT'); {$endif}
|
|
||||||
|
{$ifdef dbgDBGrid}DebugLnEnter('TCustomDBGrid.doLayoutChanged INIT',[]);{$endif}
|
||||||
BeginUpdate;
|
BeginUpdate;
|
||||||
if UpdateGridCounts=0 then
|
if UpdateGridCounts=0 then
|
||||||
EmptyGrid;
|
EmptyGrid;
|
||||||
EndUpdate;
|
EndUpdate;
|
||||||
UpdateScrollbarRange;
|
UpdateScrollbarRange;
|
||||||
{$ifdef dbgDBGrid} DebugLn('doLayoutChanged FIN'); {$endif}
|
{$ifdef dbgDBGrid}DebugLnExit('TCustomDBGrid.doLayoutChanged DONE',[]);{$endif}
|
||||||
end;
|
end;
|
||||||
{
|
{
|
||||||
procedure TCustomDBGrid.WriteColumns(Writer: TWriter);
|
procedure TCustomDBGrid.WriteColumns(Writer: TWriter);
|
||||||
@ -2114,7 +2115,7 @@ var
|
|||||||
ResetEditor;
|
ResetEditor;
|
||||||
end;
|
end;
|
||||||
begin
|
begin
|
||||||
{$IfDef dbgGrid}DebugLn('DBGrid.KeyDown %s INIT Key=%d',[Name,Key]);{$Endif}
|
{$IfDef dbgGrid}DebugLnEnter('DBGrid.KeyDown %s INIT Key=%d',[Name,Key]);{$Endif}
|
||||||
case Key of
|
case Key of
|
||||||
|
|
||||||
VK_TAB:
|
VK_TAB:
|
||||||
@ -2296,7 +2297,7 @@ begin
|
|||||||
else
|
else
|
||||||
inherited KeyDown(Key, Shift);
|
inherited KeyDown(Key, Shift);
|
||||||
end;
|
end;
|
||||||
{$IfDef dbgGrid}DebugLn('DBGrid.KeyDown END Key= %d',[Key]);{$Endif}
|
{$IfDef dbgGrid}DebugLnExit('DBGrid.KeyDown END Key= %d',[Key]);{$Endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomDBGrid.MouseDown(Button: TMouseButton; Shift: TShiftState; X,
|
procedure TCustomDBGrid.MouseDown(Button: TMouseButton; Shift: TShiftState; X,
|
||||||
@ -2339,9 +2340,11 @@ var
|
|||||||
EditorMode := False;
|
EditorMode := False;
|
||||||
end;
|
end;
|
||||||
begin
|
begin
|
||||||
{$ifdef dbgDBGrid}DebugLn('DBGrid.mousedown - INIT');{$endif}
|
|
||||||
if (csDesigning in componentState) {or not GCache.ValidGrid }then
|
if (csDesigning in componentState) {or not GCache.ValidGrid }then begin
|
||||||
|
{$ifdef dbgDBGrid}DebugLn('DBGrid.mousedown - checkDesigning');{$endif}
|
||||||
exit;
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
if UpdatingData then begin
|
if UpdatingData then begin
|
||||||
{$ifdef dbgDBGrid}DebugLn('DBGrid.MouseDown - UpdatingData');{$endif}
|
{$ifdef dbgDBGrid}DebugLn('DBGrid.MouseDown - UpdatingData');{$endif}
|
||||||
@ -2349,11 +2352,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
if not MouseButtonAllowed(Button) then begin
|
if not MouseButtonAllowed(Button) then begin
|
||||||
|
{$ifdef dbgDBGrid}DebugLn('DBGrid.MouseDown - no mouse allowed');{$endif}
|
||||||
doInherited;
|
doInherited;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IfDef dbgGrid} DebugLn('DBGrid.MouseDown INIT'); {$Endif}
|
{$IfDef dbgGrid} DebugLnEnter('DBGrid.MouseDown INIT'); {$Endif}
|
||||||
Gz:=MouseToGridZone(X,Y);
|
Gz:=MouseToGridZone(X,Y);
|
||||||
CacheMouseDown(X,Y);
|
CacheMouseDown(X,Y);
|
||||||
case Gz of
|
case Gz of
|
||||||
@ -2404,7 +2408,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{$IfDef dbgGrid} DebugLn('DBGrid.MouseDown END'); {$Endif}
|
{$IfDef dbgGrid} DebugLnExit('DBGrid.MouseDown END'); {$Endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomDBGrid.MouseMove(Shift: TShiftState; X, Y: Integer);
|
procedure TCustomDBGrid.MouseMove(Shift: TShiftState; X, Y: Integer);
|
||||||
@ -3106,7 +3110,7 @@ begin
|
|||||||
// find out the column count, if result=0 then
|
// find out the column count, if result=0 then
|
||||||
// there are no visible columns defined or dataset is inactive
|
// there are no visible columns defined or dataset is inactive
|
||||||
// or there are no visible fields, ie the grid is blank
|
// or there are no visible fields, ie the grid is blank
|
||||||
{$IfDef dbgDBGrid}DebugLn('TCustomDbgrid.UpdateGridCounts INIT');{$endif}
|
{$IfDef dbgDBGrid}DebugLnEnter('TCustomDbgrid.UpdateGridCounts INIT');{$endif}
|
||||||
BeginUpdate;
|
BeginUpdate;
|
||||||
try
|
try
|
||||||
Result := GetColumnCount;
|
Result := GetColumnCount;
|
||||||
@ -3142,7 +3146,7 @@ begin
|
|||||||
finally
|
finally
|
||||||
EndUpdate;
|
EndUpdate;
|
||||||
end;
|
end;
|
||||||
{$IfDef dbgDBGrid}DebugLn('TCustomDbgrid.UpdateGridCounts END');{$endif}
|
{$IfDef dbgDBGrid}DebugLnExit('TCustomDbgrid.UpdateGridCounts END');{$endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TCustomDBGrid.Create(AOwner: TComponent);
|
constructor TCustomDBGrid.Create(AOwner: TComponent);
|
||||||
@ -3431,10 +3435,13 @@ end;
|
|||||||
procedure TComponentDataLink.LayoutChanged;
|
procedure TComponentDataLink.LayoutChanged;
|
||||||
begin
|
begin
|
||||||
{$ifdef dbgDBGrid}
|
{$ifdef dbgDBGrid}
|
||||||
DebugLn('TComponentDataLink.LayoutChanged');
|
DebugLnEnter('TComponentDataLink.LayoutChanged INIT');
|
||||||
{$Endif}
|
{$Endif}
|
||||||
if Assigned(OnLayoutChanged) then
|
if Assigned(OnLayoutChanged) then
|
||||||
OnLayoutChanged(DataSet);
|
OnLayoutChanged(DataSet);
|
||||||
|
{$ifdef dbgDBGrid}
|
||||||
|
DebugLnExit('TComponentDataLink.LayoutChanged END');
|
||||||
|
{$Endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TComponentDataLink.DataSetScrolled(Distance: Integer);
|
procedure TComponentDataLink.DataSetScrolled(Distance: Integer);
|
||||||
|
Loading…
Reference in New Issue
Block a user