Issue #12: fix row count always -1 on SQLite, in "copy table" dialog

This commit is contained in:
Ansgar Becker
2020-01-22 13:04:39 +01:00
parent feeb17e7d4
commit 103a61dc52
3 changed files with 9 additions and 6 deletions

View File

@ -255,7 +255,7 @@ begin
nColumns: CellText := _('Columns');
nKeys: CellText := _('Indexes');
nForeignKeys: CellText := _('Foreign keys');
nData: CellText := f_('Data (%s rows)', [FormatNumber(FDBObj.Rows)]);
nData: CellText := f_('Data (%s rows)', [FormatNumber(FDBObj.RowCount(False))]);
else raise Exception.Create(_(SUnhandledNodeIndex));
end;
if Node.Index <> nData then begin
@ -315,7 +315,7 @@ begin
end;
if ChildCount > 0 then
Include(InitialStates, ivsHasChildren);
if (ChildCount = 0) or ((Node.Index = nData) and (FDBObj.Rows = 0)) then
if (ChildCount = 0) or ((Node.Index = nData) and (FDBObj.RowCount(False) = 0)) then
Node.States := Node.States + [vsDisabled]
else if AppSettings.ReadBool(Option) then
Node.CheckState := csCheckedNormal;