mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-12 09:39:16 +02:00
Qt: fixed infinite loop and crash with spurious events from mdiarea, when try to focusin/focusout
mdichild form. git-svn-id: trunk@33334 -
This commit is contained in:
parent
bfc0d54628
commit
576ac959ca
@ -584,8 +584,10 @@ begin
|
||||
// WriteLn('KILL: ', OldWidget.LCLObject.ClassName);
|
||||
Msg.msg := LM_KILLFOCUS;
|
||||
Msg.wParam := PtrInt(NewWidget);
|
||||
if (OldWidget is TQtMainWindow) and (TQtMainWindow(OldWidget).IsMdiChild) then
|
||||
TQtMainWindow(OldWidget).SlotActivateWindow(False)
|
||||
if (OldWidget is TQtMainWindow) and (TQtMainWindow(OldWidget).IsMdiChild) and
|
||||
Assigned(TQtMainWindow(OldWidget).LCLObject) and
|
||||
not (csDesigning in TQtMainWindow(OldWidget).LCLObject.ComponentState) then
|
||||
// DO NOT TRIGGER ANYTHING, THIS IS SPURIOUS EVENT FROM MDIAREA
|
||||
else
|
||||
OldWidget.DeliverMessage(Msg);
|
||||
end;
|
||||
@ -594,8 +596,10 @@ begin
|
||||
// WriteLn('SET: ', NewWidget.LCLObject.ClassName);
|
||||
Msg.msg := LM_SETFOCUS;
|
||||
Msg.wParam := PtrInt(OldWidget);
|
||||
if (NewWidget is TQtMainWindow) and (TQtMainWindow(NewWidget).IsMdiChild) then
|
||||
TQtMainWindow(NewWidget).SlotActivateWindow(True)
|
||||
if (NewWidget is TQtMainWindow) and (TQtMainWindow(NewWidget).IsMdiChild) and
|
||||
Assigned(TQtMainWindow(NewWidget).LCLObject) and
|
||||
not (csDesigning in TQtMainWindow(NewWidget).LCLObject.ComponentState) then
|
||||
// DO NOT TRIGGER ANYTHING, THIS IS SPURIOUS EVENT FROM MDIAREA
|
||||
else
|
||||
NewWidget.DeliverMessage(Msg);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user