mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 08:16:04 +02:00
Qt: Fix TQtLineEdit: don't fire TQtLineEdit.selectAll() via AutoSelect property during designtime.
git-svn-id: trunk@15892 -
This commit is contained in:
parent
65a1a5ece9
commit
277a9e21e0
@ -4861,14 +4861,17 @@ begin
|
|||||||
case QEvent_type(Event) of
|
case QEvent_type(Event) of
|
||||||
QEventFocusIn:
|
QEventFocusIn:
|
||||||
begin
|
begin
|
||||||
if QFocusEvent_reason(QFocusEventH(Event)) in
|
if not (csDesigning in LCLObject.ComponentState) then
|
||||||
[QtTabFocusReason,QtBacktabFocusReason,QtActiveWindowFocusReason,
|
|
||||||
QtShortcutFocusReason, QtOtherFocusReason] then
|
|
||||||
begin
|
begin
|
||||||
// it would be better if we have AutoSelect published from TCustomEdit
|
if QFocusEvent_reason(QFocusEventH(Event)) in
|
||||||
// then TMaskEdit also belongs here.
|
[QtTabFocusReason,QtBacktabFocusReason,QtActiveWindowFocusReason,
|
||||||
if ((LCLObject is TEdit) and (TEdit(LCLObject).AutoSelect)) then
|
QtShortcutFocusReason, QtOtherFocusReason] then
|
||||||
QLineEdit_selectAll(QLineEditH(Widget));
|
begin
|
||||||
|
// it would be better if we have AutoSelect published from TCustomEdit
|
||||||
|
// then TMaskEdit also belongs here.
|
||||||
|
if ((LCLObject is TEdit) and (TEdit(LCLObject).AutoSelect)) then
|
||||||
|
QLineEdit_selectAll(QLineEditH(Widget));
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user