From 4f157751edf191946272cb7f75eb026b99d21912 Mon Sep 17 00:00:00 2001 From: zeljko Date: Thu, 26 Nov 2009 18:15:27 +0000 Subject: [PATCH] Qt: TQtComboBox -> do not call IntfGetItems if our combo list is still visible.fixes #15183 git-svn-id: trunk@22802 - --- lcl/interfaces/qt/qtwidgets.pas | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lcl/interfaces/qt/qtwidgets.pas b/lcl/interfaces/qt/qtwidgets.pas index f133de8924..9fe3533ee8 100644 --- a/lcl/interfaces/qt/qtwidgets.pas +++ b/lcl/interfaces/qt/qtwidgets.pas @@ -710,6 +710,7 @@ type // parts FLineEdit: TQtLineEdit; FDropList: TQtListWidget; + FDropListVisibleInternal: Boolean; function GetDropList: TQtListWidget; function GetLineEdit: TQtLineEdit; procedure SetOwnerDrawn(const AValue: Boolean); @@ -6003,6 +6004,7 @@ begin {$ifdef VerboseQt} WriteLn('TQtComboBox.Create'); {$endif} + FDropListVisibleInternal := False; Result := QComboBox_create(); // disable AutoCompletion. LCL has its own QComboBox_setAutoCompletion(QComboboxH(Result), False); @@ -6392,7 +6394,11 @@ begin QEvent_accept(Event); end; end; - QEventFocusIn: TCustomComboBox(LCLObject).IntfGetItems; + QEventFocusIn: + begin + if not FDropListVisibleInternal then + TCustomComboBox(LCLObject).IntfGetItems; + end; QEventKeyPress, QEventKeyRelease: begin @@ -6485,6 +6491,7 @@ begin Msg.NotifyCode := VisibilityToCodeMap[AVisible]; DeliverMessage(Msg); + FDropListVisibleInternal := AVisible; end; { TQtAbstractSpinBox }