From e2986ffdf1870c7a38583b17e818edb9d221bcdc Mon Sep 17 00:00:00 2001 From: alexs75 Date: Thu, 11 Apr 2013 16:45:50 +0000 Subject: [PATCH] RxDBGrid - fix open dataset without create collumns git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2724 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/rx/rxdbgrid.pas | 2 +- components/rx/tooledit.pas | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/rx/rxdbgrid.pas b/components/rx/rxdbgrid.pas index 5c97ebb5f..a8f424b6a 100644 --- a/components/rx/rxdbgrid.pas +++ b/components/rx/rxdbgrid.pas @@ -3784,7 +3784,7 @@ var RCol:TRxColumn; begin if (not (FFooterOptions.Active and DatalinkActive)) or (Columns.Count = 0) or - (DataSource.DataSet.RecordCount<=0) then + (DataSource.DataSet.RecordCount<=0) or (gsAddingAutoColumns in GridStatus) then Exit; //Дополнительно проверим - а стоит ли делать пробег по данным - есть ли агрегатные функции APresent := False; diff --git a/components/rx/tooledit.pas b/components/rx/tooledit.pas index d61bde02a..22f0f0f81 100644 --- a/components/rx/tooledit.pas +++ b/components/rx/tooledit.pas @@ -233,7 +233,7 @@ var begin with Editor do begin - if NewStyleControls then +(* if NewStyleControls then begin if BorderStyle = bsNone then I := 0 @@ -245,7 +245,7 @@ begin Result.X := {SendMessage(Handle, LM_GETMARGINS, 0, 0) and $0000FFFF} + I; Result.Y := I; end - else + else *) begin if BorderStyle = bsNone then I := 0