Skip to content

Commit 5f39a44

Browse files
committed
fix: remove dead code
1 parent 82ef10e commit 5f39a44

File tree

2 files changed

+0
-50
lines changed

2 files changed

+0
-50
lines changed

source/main.lfm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ object MainForm: TMainForm
1313
OnCloseQuery = FormCloseQuery
1414
OnCreate = FormCreate
1515
OnDestroy = FormDestroy
16-
OnMouseWheel = FormMouseWheel
1716
OnShow = FormShow
1817
object StatusBar: TStatusBar
1918
Left = 0

source/main.pas

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,8 +1007,6 @@ TMainForm = class(TExtForm)
10071007
procedure PageControlMainContextPopup(Sender: TObject; MousePos: TPoint; var Handled: Boolean);
10081008
procedure menuQueryHelpersGenerateStatementClick(Sender: TObject);
10091009
procedure actSelectInverseExecute(Sender: TObject);
1010-
procedure FormMouseWheel(Sender: TObject; Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint;
1011-
var Handled: Boolean);
10121010
procedure actDataResetSortingExecute(Sender: TObject);
10131011
procedure actReformatSQLExecute(Sender: TObject);
10141012
procedure DBtreeFocusChanging(Sender: TBaseVirtualTree; OldNode,
@@ -3285,7 +3283,6 @@ procedure TMainForm.AfterQueryExecution(Thread: TQueryThread);
32853283
col: TVirtualTreeColumn;
32863284
TabCaption, TabCaptions, BatchHead: String;
32873285
TabCaptionsList: TStringList;
3288-
TabsetColor: TColor;
32893286
Results: TDBQuery;
32903287
i, HeaderPadding, HeaderLineBreaks: Integer;
32913288
begin
@@ -3294,17 +3291,6 @@ procedure TMainForm.AfterQueryExecution(Thread: TQueryThread);
32943291
ShowStatusMsg(_('Setting up result grid(s) ...'));
32953292
Tab := QueryTabs.TabByNumber(Thread.TabNumber);
32963293

3297-
// Use session color on result tabs
3298-
TabsetColor := Thread.Connection.Parameters.SessionColor;
3299-
if TabsetColor <> clNone then begin
3300-
Tab.tabsetQuery.Color := TabsetColor;
3301-
//Tab.tabsetQuery.UnselectedColor := ColorAdjustLuma(TabsetColor, 20, False);
3302-
end
3303-
else begin
3304-
Tab.tabsetQuery.Color := clWindow;
3305-
//Tab.tabsetQuery.UnselectedColor := clBtnFace;
3306-
end;
3307-
33083294
// Get tab caption list from comment, similar to a name:xyz in a single query
33093295
BatchHead := Copy(Thread.Batch.SQL, 1, SIZE_KB);
33103296
TabCaptions := RegExprGetMatch('--\s+names\:\s*([^\r\n]+)', BatchHead, 1, False, True);
@@ -13658,41 +13644,6 @@ procedure TMainForm.DBtreeChange(Sender: TBaseVirtualTree; Node: PVirtualNode);
1365813644
end;
1365913645

1366013646

13661-
procedure TMainForm.FormMouseWheel(Sender: TObject; Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint;
13662-
var Handled: Boolean);
13663-
{var
13664-
Control: TControl;
13665-
VT: TBaseVirtualTree;
13666-
PageControl: TPageControl;}
13667-
begin
13668-
// Wheel scrolling only works in component which has focus. Help out by doing that by hand at least for any VirtualTree.
13669-
// See http://www.delphipraxis.net/viewtopic.php?p=1113607
13670-
// TODO: Does not work when a SynMemo has focus, probably related to the broken solution of this issue:
13671-
// http://sourceforge.net/tracker/index.php?func=detail&aid=1574059&group_id=3221&atid=103221
13672-
// Likely not required with Lazarus
13673-
{Control := ControlAtPos(Mouse.CursorPos, True, True);
13674-
if (Control is TBaseVirtualTree) and (not Control.Focused) and PtInRect(Control.ClientRect, Control.ScreenToClient(MousePos)) then begin
13675-
VT := Control as TBaseVirtualTree;
13676-
VT.OffsetY := VT.OffsetY + (WheelDelta div 2); // Don't know why, but WheelDelta is twice as big as it normally appears
13677-
VT.UpdateScrollBars(True);
13678-
Handled := True;
13679-
end else if Control is TPageControl then begin
13680-
// Scroll tabs horizontally per mouse wheel
13681-
PageControl := Control as TPageControl;
13682-
if PageControl.MultiLine then begin
13683-
Handled := False;
13684-
end
13685-
else begin
13686-
PageControl.ScrollTabs(WheelDelta div WHEEL_DELTA);
13687-
if PageControl = PageControlMain then
13688-
FixQueryTabCloseButtons;
13689-
Handled := True;
13690-
end;
13691-
end else}
13692-
Handled := False;
13693-
end;
13694-
13695-
1369613647
procedure TMainForm.actDataResetSortingExecute(Sender: TObject);
1369713648
begin
1369813649
FDataGridSortItems.Clear;

0 commit comments

Comments
 (0)