mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 01:02:41 +02:00
Qt,Qt5,Qt6: fixed wierd focus behaviour. issue #10155
This commit is contained in:
parent
d2e0bdee01
commit
559078741e
@ -5002,7 +5002,7 @@ end;
|
|||||||
procedure TQtWidget.setFocus;
|
procedure TQtWidget.setFocus;
|
||||||
begin
|
begin
|
||||||
if getFocusPolicy <> QtNoFocus then
|
if getFocusPolicy <> QtNoFocus then
|
||||||
QWidget_setFocus(Widget, QtTabFocusReason)
|
QWidget_setFocus(Widget, QtOtherFocusReason) {issue #10155}
|
||||||
else
|
else
|
||||||
QWidget_setFocus(Widget);
|
QWidget_setFocus(Widget);
|
||||||
end;
|
end;
|
||||||
@ -12615,7 +12615,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
// issue #40089
|
// issue #40089
|
||||||
if {(ViewStyle < 0) and} (QEvent_type(Event) = QEventFocusIn) and
|
if {(ViewStyle < 0) and} (QEvent_type(Event) = QEventFocusIn) and
|
||||||
(QFocusEvent_reason(QFocusEventH(Event)) = QtTabFocusReason) and
|
(QFocusEvent_reason(QFocusEventH(Event)) >= QtTabFocusReason) and
|
||||||
(TCustomListBox(LCLObject).ItemIndex = -1) then
|
(TCustomListBox(LCLObject).ItemIndex = -1) then
|
||||||
begin
|
begin
|
||||||
Result := True;
|
Result := True;
|
||||||
|
@ -5093,7 +5093,7 @@ end;
|
|||||||
procedure TQtWidget.setFocus;
|
procedure TQtWidget.setFocus;
|
||||||
begin
|
begin
|
||||||
if getFocusPolicy <> QtNoFocus then
|
if getFocusPolicy <> QtNoFocus then
|
||||||
QWidget_setFocus(Widget, QtTabFocusReason)
|
QWidget_setFocus(Widget, QtOtherFocusReason) {issue #10155}
|
||||||
else
|
else
|
||||||
QWidget_setFocus(Widget);
|
QWidget_setFocus(Widget);
|
||||||
end;
|
end;
|
||||||
@ -12900,7 +12900,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
// issue #40089
|
// issue #40089
|
||||||
if {(ViewStyle < 0) and} (QEvent_type(Event) = QEventFocusIn) and
|
if {(ViewStyle < 0) and} (QEvent_type(Event) = QEventFocusIn) and
|
||||||
(QFocusEvent_reason(QFocusEventH(Event)) = QtTabFocusReason) and
|
(QFocusEvent_reason(QFocusEventH(Event)) >= QtTabFocusReason) and
|
||||||
(TCustomListBox(LCLObject).ItemIndex = -1) then
|
(TCustomListBox(LCLObject).ItemIndex = -1) then
|
||||||
begin
|
begin
|
||||||
Result := True;
|
Result := True;
|
||||||
|
@ -5100,7 +5100,7 @@ end;
|
|||||||
procedure TQtWidget.setFocus;
|
procedure TQtWidget.setFocus;
|
||||||
begin
|
begin
|
||||||
if getFocusPolicy <> QtNoFocus then
|
if getFocusPolicy <> QtNoFocus then
|
||||||
QWidget_setFocus(Widget, QtTabFocusReason)
|
QWidget_setFocus(Widget, QtOtherFocusReason) {issue #10155}
|
||||||
else
|
else
|
||||||
QWidget_setFocus(Widget);
|
QWidget_setFocus(Widget);
|
||||||
end;
|
end;
|
||||||
@ -12932,7 +12932,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
// issue #40089
|
// issue #40089
|
||||||
if {(ViewStyle < 0) and} (QEvent_type(Event) = QEventFocusIn) and
|
if {(ViewStyle < 0) and} (QEvent_type(Event) = QEventFocusIn) and
|
||||||
(QFocusEvent_reason(QFocusEventH(Event)) = QtTabFocusReason) and
|
(QFocusEvent_reason(QFocusEventH(Event)) >= QtTabFocusReason) and
|
||||||
(TCustomListBox(LCLObject).ItemIndex = -1) then
|
(TCustomListBox(LCLObject).ItemIndex = -1) then
|
||||||
begin
|
begin
|
||||||
Result := True;
|
Result := True;
|
||||||
|
Loading…
Reference in New Issue
Block a user