Qt: fixed crash with QTSCROLLABLEFORMS define under MacOSX.

git-svn-id: trunk@45008 -
This commit is contained in:
zeljko 2014-05-11 16:54:37 +00:00
parent d57cd64ddb
commit c6cd3f4538
2 changed files with 8 additions and 4 deletions

View File

@ -8,7 +8,5 @@
{$IF DEFINED(DARWIN) AND DEFINED(CPU64)}
{$DEFINE QTCOCOA}
{$ENDIF}
{$IFNDEF QTCOCOA}
{$DEFINE QTSCROLLABLEFORMS}
{$ENDIF}
{$ENDIF}

View File

@ -3806,8 +3806,14 @@ begin
Msg.WheelDelta := -1;
Msg.WheelDelta := (120 * Msg.WheelDelta) div Mouse.WheelScrollLines;
if FOwner <> nil then
CCtl := TQtAbstractScrollArea(FOwner)
else
begin
{$IFDEF QTSCROLLABLEFORMS}
if (FOwner is TQtMainWindow) then
CCtl := TQtMainWindow(FOwner).ScrollArea
else
{$ENDIF}
CCtl := TQtAbstractScrollArea(FOwner);
end else
CCtl := TQtAbstractScrollArea(Self);
//now fix ugly behaviour.
if (Msg.WheelDelta > 0) and (CCtl.FVScrollbar.getVisible) and