From 42e5277be92252f027d406b93c343c49c347c6a1 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Thu, 19 Feb 2026 18:42:07 +0100 Subject: [PATCH] enhance: export tables which are hidden through the table filter Closes #1983 --- extra/locale/heidisql.po | 6 +++--- source/tabletools.pas | 25 ++++++++++++++----------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/extra/locale/heidisql.po b/extra/locale/heidisql.po index 8bd29ff1..5f8f5588 100644 --- a/extra/locale/heidisql.po +++ b/extra/locale/heidisql.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: HeidiSQL\n" "POT-Creation-Date: 2012-11-05 21:40\n" -"PO-Revision-Date: 2026-02-04 17:28+0100\n" +"PO-Revision-Date: 2026-02-19 18:41+0100\n" "Last-Translator: Ansgar Becker \n" "Language-Team: English (http://www.transifex.com/projects/p/heidisql/language/en/)\n" "Language: en\n" @@ -5213,8 +5213,8 @@ msgid "All data types" msgstr "All data types" #: tabletools.pas:370 -msgid "Selected objects size: %s" -msgstr "Selected objects size: %s" +msgid "%s selected objects, size: %s" +msgstr "%s selected objects, size: %s" #: tabletools.pas:725 msgid "%s%s doesn't have columns of selected type (%s)." diff --git a/source/tabletools.pas b/source/tabletools.pas index 276cbe97..e0911b65 100644 --- a/source/tabletools.pas +++ b/source/tabletools.pas @@ -179,7 +179,7 @@ type FHeaderCreated: Boolean; FFindSeeResultSQL: TStringList; ToFile, ToDir, ToClipboard, ToDb, ToServer: Boolean; - FObjectSizes, FObjectSizesDone, FObjectSizesDoneExact: Int64; + FObjectCount, FObjectSizes, FObjectSizesDone, FObjectSizesDoneExact: Int64; FStartTimeAll: Cardinal; procedure SetToolMode(Value: TToolMode); procedure Output(SQL: String; IsEndOfQuery, ForFile, ForDir, ForDb, ForServer: Boolean); @@ -379,6 +379,7 @@ begin TreeObjects.RootNodeCount := Mainform.DBtree.RootNodeCount; FObjectSizes := 0; + FObjectCount := 0; // Init all objects in active database, so the tree does not just check the db node // if we want the first child only. See issue #2267. @@ -622,7 +623,7 @@ begin SomeChecked := TreeObjects.CheckedCount > 0; TExtForm.PageControlTabHighlight(tabsTools); btnSeeResults.Visible := tabsTools.ActivePage = tabFind; - lblCheckedSize.Caption := f_('Selected objects size: %s', [FormatByteNumber(FObjectSizes)]); + lblCheckedSize.Caption := f_('%s selected objects, size: %s', [FObjectCount.ToString, FormatByteNumber(FObjectSizes)]); menuExportOptionClick(Sender); if tabsTools.ActivePage = tabMaintenance then begin btnExecute.Caption := _('Execute'); @@ -805,7 +806,7 @@ begin // Return list with checked objects from database node // The caller doesn't need to care whether type grouping in tree is activated Result := TDBObjectList.Create(False); - Child := TreeObjects.GetFirstVisibleChild(DBNode); + Child := TreeObjects.GetFirstChild(DBNode); while Assigned(Child) do begin if Child.CheckState in CheckedStates then begin ChildObj := TreeObjects.GetNodeData(Child); @@ -813,13 +814,13 @@ begin case ChildObj.NodeType of lntGroup: begin - GrandChild := TreeObjects.GetFirstVisibleChild(Child); + GrandChild := TreeObjects.GetFirstChild(Child); while Assigned(GrandChild) do begin if GrandChild.CheckState in CheckedStates then begin GrandChildObj := TreeObjects.GetNodeData(GrandChild); Result.Add(GrandChildObj^); end; - GrandChild := TreeObjects.GetNextVisibleSibling(GrandChild); + GrandChild := TreeObjects.GetNextSibling(GrandChild); end; end @@ -829,7 +830,7 @@ begin end; end; - Child := TreeObjects.GetNextVisibleSibling(Child); + Child := TreeObjects.GetNextSibling(Child); end; end; @@ -916,7 +917,7 @@ begin SessionNode := TreeObjects.GetFirstChild(nil); while Assigned(SessionNode) do begin - DBNode := TreeObjects.GetFirstVisibleChild(SessionNode); + DBNode := TreeObjects.GetFirstChild(SessionNode); while Assigned(DBNode) do begin if not (DBNode.CheckState in [csUncheckedNormal, csUncheckedPressed]) then begin Triggers.Clear; @@ -953,7 +954,7 @@ begin end; if FCancelled then Break; - DBNode := TreeObjects.GetNextVisibleSibling(DBNode); + DBNode := TreeObjects.GetNextSibling(DBNode); end; // End of db item loop if FCancelled then Break; SessionNode := TreeObjects.GetNextSibling(SessionNode); @@ -1419,18 +1420,20 @@ begin timerCalcSize.Enabled := False; SessionNode := TreeObjects.GetFirstChild(nil); FObjectSizes := 0; + FObjectCount := 0; while Assigned(SessionNode) do begin - DBNode := TreeObjects.GetFirstVisibleChild(SessionNode); + DBNode := TreeObjects.GetFirstChild(SessionNode); while Assigned(DBNode) do begin if not (DBNode.CheckState in [csUncheckedNormal, csUncheckedPressed]) then begin CheckedObjects := GetCheckedObjects(DBNode); for DBObj in CheckedObjects do begin Inc(FObjectSizes, DBObj.Size); + Inc(FObjectCount); end; end; - DBNode := TreeObjects.GetNextVisibleSibling(DBNode); + DBNode := TreeObjects.GetNextSibling(DBNode); end; - SessionNode := TreeObjects.GetNextVisibleSibling(SessionNode); + SessionNode := TreeObjects.GetNextSibling(SessionNode); end; ValidateControls(Sender); end;