mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-19 07:23:09 +02:00
Qt: remove unneded clearFocus from SetFocus() after focus changes in LCL.
git-svn-id: trunk@25287 -
This commit is contained in:
parent
5ee47f5771
commit
e2a8f33ce7
@ -4699,23 +4699,13 @@ end;
|
|||||||
|
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
function TQtWidgetSet.SetFocus(hWnd: HWND): HWND;
|
function TQtWidgetSet.SetFocus(hWnd: HWND): HWND;
|
||||||
var
|
|
||||||
QtEdit: IQtEdit;
|
|
||||||
begin
|
begin
|
||||||
if hwnd<>0 then
|
if hwnd<>0 then
|
||||||
begin
|
begin
|
||||||
{$ifdef VerboseFocus}
|
{$ifdef VerboseFocus}
|
||||||
WriteLn('********* TQtWidgetSet.SetFocus INIT focusing ', TQtWidget(hwnd).lclobject.name);
|
WriteLn('********* TQtWidgetSet.SetFocus INIT focusing ', TQtWidget(hwnd).lclobject.name);
|
||||||
{$endif}
|
{$endif}
|
||||||
result := GetFocus;
|
Result := GetFocus;
|
||||||
|
|
||||||
if (Result <> 0) and (Result <> hWnd) and not
|
|
||||||
((TQtWidget(Hwnd) is TQtMainWindow) or
|
|
||||||
(TQtWidget(Result) is TQtMainWindow)) and
|
|
||||||
Supports(TQtWidget(Result), IQtEdit, QtEdit)
|
|
||||||
then
|
|
||||||
QWidget_clearFocus(TQtWidget(Result).Widget);
|
|
||||||
|
|
||||||
TQtWidget(hWnd).setFocus;
|
TQtWidget(hWnd).setFocus;
|
||||||
{$ifdef VerboseFocus}
|
{$ifdef VerboseFocus}
|
||||||
DebugLn('********* TQtWidgetSet.SetFocus END was %x now is %x',[result,hwnd]);
|
DebugLn('********* TQtWidgetSet.SetFocus END was %x now is %x',[result,hwnd]);
|
||||||
|
Loading…
Reference in New Issue
Block a user