Qt,Qt5: fixed design time bug on TPageControl. issue #36939

git-svn-id: trunk@63035 -
This commit is contained in:
zeljko 2020-04-20 15:38:55 +00:00
parent 6c936074db
commit b2bd6716d6
2 changed files with 6 additions and 4 deletions

View File

@ -11083,7 +11083,7 @@ end;
procedure TQtTabWidget.setCurrentWidget(APage: TQtWidget; const AIsMoved: Boolean);
begin
QTabWidget_setCurrentWidget(QTabWidgetH(Widget), APage.Widget);
if AisMoved then
if AIsMoved and (Assigned(LCLObject) and not (csDesigning in LCLObject.ComponentState)) then
APage.setFocus;
end;
@ -18594,7 +18594,8 @@ begin
exit;
end;
end else
if (QEvent_type(Event) = QEventShow) then
if (QEvent_type(Event) = QEventShow) and Assigned(LCLObject) and
not (csDesigning in LCLObject.ComponentState) then
begin
if Assigned(DragManager) and DragManager.IsDragging then
ACapture := GetCapture

View File

@ -11107,7 +11107,7 @@ end;
procedure TQtTabWidget.setCurrentWidget(APage: TQtWidget; const AIsMoved: Boolean);
begin
QTabWidget_setCurrentWidget(QTabWidgetH(Widget), APage.Widget);
if AisMoved then
if AIsMoved and (Assigned(LCLObject) and not (csDesigning in LCLObject.ComponentState)) then
APage.setFocus;
end;
@ -18620,7 +18620,8 @@ begin
exit;
end;
end else
if (QEvent_type(Event) = QEventShow) then
if (QEvent_type(Event) = QEventShow) and Assigned(LCLObject) and
not (csDesigning in LCLObject.ComponentState) then
begin
if Assigned(DragManager) and DragManager.IsDragging then
ACapture := GetCapture