Qt: Fix TQtLineEdit: don't fire TQtLineEdit.selectAll() via AutoSelect property during designtime.

git-svn-id: trunk@15892 -
This commit is contained in:
zeljko 2008-07-27 16:55:07 +00:00
parent 65a1a5ece9
commit 277a9e21e0

View File

@ -4861,14 +4861,17 @@ begin
case QEvent_type(Event) of
QEventFocusIn:
begin
if QFocusEvent_reason(QFocusEventH(Event)) in
[QtTabFocusReason,QtBacktabFocusReason,QtActiveWindowFocusReason,
QtShortcutFocusReason, QtOtherFocusReason] then
if not (csDesigning in LCLObject.ComponentState) then
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));
if QFocusEvent_reason(QFocusEventH(Event)) in
[QtTabFocusReason,QtBacktabFocusReason,QtActiveWindowFocusReason,
QtShortcutFocusReason, QtOtherFocusReason] then
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;