mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-07 09:17:19 +01:00
Qt: fixed crash with QTSCROLLABLEFORMS define under MacOSX.
git-svn-id: trunk@45008 -
This commit is contained in:
parent
d57cd64ddb
commit
c6cd3f4538
@ -8,7 +8,5 @@
|
|||||||
{$IF DEFINED(DARWIN) AND DEFINED(CPU64)}
|
{$IF DEFINED(DARWIN) AND DEFINED(CPU64)}
|
||||||
{$DEFINE QTCOCOA}
|
{$DEFINE QTCOCOA}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$IFNDEF QTCOCOA}
|
|
||||||
{$DEFINE QTSCROLLABLEFORMS}
|
{$DEFINE QTSCROLLABLEFORMS}
|
||||||
{$ENDIF}
|
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|||||||
@ -3806,8 +3806,14 @@ begin
|
|||||||
Msg.WheelDelta := -1;
|
Msg.WheelDelta := -1;
|
||||||
Msg.WheelDelta := (120 * Msg.WheelDelta) div Mouse.WheelScrollLines;
|
Msg.WheelDelta := (120 * Msg.WheelDelta) div Mouse.WheelScrollLines;
|
||||||
if FOwner <> nil then
|
if FOwner <> nil then
|
||||||
CCtl := TQtAbstractScrollArea(FOwner)
|
begin
|
||||||
else
|
{$IFDEF QTSCROLLABLEFORMS}
|
||||||
|
if (FOwner is TQtMainWindow) then
|
||||||
|
CCtl := TQtMainWindow(FOwner).ScrollArea
|
||||||
|
else
|
||||||
|
{$ENDIF}
|
||||||
|
CCtl := TQtAbstractScrollArea(FOwner);
|
||||||
|
end else
|
||||||
CCtl := TQtAbstractScrollArea(Self);
|
CCtl := TQtAbstractScrollArea(Self);
|
||||||
//now fix ugly behaviour.
|
//now fix ugly behaviour.
|
||||||
if (Msg.WheelDelta > 0) and (CCtl.FVScrollbar.getVisible) and
|
if (Msg.WheelDelta > 0) and (CCtl.FVScrollbar.getVisible) and
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user