mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-26 20:40:36 +02:00
Qt: fixed segfault when designing TTabControl.
git-svn-id: trunk@34269 -
This commit is contained in:
parent
d2c89a1ff3
commit
6dce0066e9
@ -188,6 +188,8 @@ begin
|
||||
Result := False;
|
||||
if not WSCheckHandleAllocated(AWinControl, 'GetDesignInteractive') then
|
||||
Exit;
|
||||
if TQtWidget(AWinControl.Handle).ChildOfComplexWidget = ccwTTabControl then
|
||||
exit;
|
||||
TabWidget := TQtTabWidget(AWinControl.Handle);
|
||||
TabBar := TabWidget.TabBar;
|
||||
p := QtPoint(AClientPos.x, AClientPos.y);
|
||||
|
@ -15386,6 +15386,7 @@ var
|
||||
WidgetToNotify: QWidgetH;
|
||||
WSQtWidget: TWSWinControlClass;
|
||||
Action: QActionH;
|
||||
AWidget: TQtWidget;
|
||||
ATabWidget: TQtTabWidget;
|
||||
ATabIndex: Integer;
|
||||
begin
|
||||
@ -15412,7 +15413,9 @@ begin
|
||||
|
||||
if Assigned(Control) and (Control is TWinControl) then
|
||||
begin
|
||||
if Control is TCustomTabControl then
|
||||
AWidget := TQtWidget(TWinControl(Control).Handle);
|
||||
if (Control is TCustomTabControl) and
|
||||
(AWidget.ChildOfComplexWidget <> ccwTTabControl) then
|
||||
WidgetToNotify := TQtTabWidget(TWinControl(Control).Handle).TabBar.Widget
|
||||
else
|
||||
WidgetToNotify := TQtWidget(TWinControl(Control).Handle).Widget;
|
||||
@ -15425,7 +15428,8 @@ begin
|
||||
|
||||
if WSQtWidget.GetDesignInteractive(TWinControl(Control), Pt) then
|
||||
begin
|
||||
if Control is TCustomTabControl then
|
||||
if (Control is TCustomTabControl) and
|
||||
(AWidget.ChildOfComplexWidget <> ccwTTabControl) then
|
||||
begin
|
||||
ATabWidget := TQtTabWidget(TWinControl(Control).Handle);
|
||||
ATabIndex := ATabWidget.tabAt(Pt);
|
||||
|
Loading…
Reference in New Issue
Block a user