qt: fix TQtComboBox.slotPaintCombo

- dont free DC 2 times
  - use currentIndex instead of Text search

git-svn-id: trunk@17535 -
This commit is contained in:
paul 2008-11-23 03:55:44 +00:00
parent b9211d6127
commit 47118a8640

View File

@ -6130,7 +6130,7 @@ begin
dec(R.Bottom);
QPainter_setClipRect(TQTDeviceContext(Msg.DC).Widget, @R);
DrawStruct.ItemID := TCustomComboBox(LCLObject).Items.IndexOf(TCustomComboBox(LCLObject).Text);
DrawStruct.ItemID := currentIndex;
DrawStruct.Area := R;
DrawStruct.DC := Msg.DC;
@ -6156,7 +6156,6 @@ begin
try
DeliverMessage(MsgItem);
finally
LCLIntf.DeleteDC(Msg.DC);
Dispose(PaintData.ClipRect);
Fillchar(FPaintData, SizeOf(FPaintData), 0);
FContext := 0;