On 22 November 2014 at 19:45, Juha Manninen <[email protected]>
wrote:

> On Fri, Nov 21, 2014 at 4:31 PM, FreeMan <[email protected]>
> wrote:
> > Thank you, uncommenting resolve my problem.
>
> Without those lines indeed Lazarus built with QT crashes when Color
> combobox list is opened.
> Why does it happen?
> I returned the code in r46966.
>
> Juha
>
>
I cannot test the QT widgetset, sorry, but I would suggest attached patch
instead.

Sandro
Index: components/ideintf/objectinspector.pp
===================================================================
--- components/ideintf/objectinspector.pp       (revisione 46968)
+++ components/ideintf/objectinspector.pp       (copia locale)
@@ -942,6 +942,7 @@
     AutoSize:=false;
     SetBounds(0,-30,Width,Height); // hidden
     DropDownCount:=20;
+    ItemHeight:=17;
     Parent:=Self;
     OnMouseDown := @ValueControlMouseDown;
     OnMouseMove := @ValueControlMouseMove;
@@ -2632,11 +2633,6 @@
       if not CompareTopLeft(FCurrentEdit.BoundsRect,EditCompRect) then
       begin
         FCurrentEdit.BoundsRect:=EditCompRect;
-        // If ItemHeight is not set, Lazarus built with QT crashes
-        //  when Color combobox list is opened. Why is that?
-        if FCurrentEdit is TComboBox then
-          
TComboBox(FCurrentEdit).ItemHeight:=EditCompRect.Bottom-EditCompRect.Top-6;
-        //
         FCurrentEdit.Invalidate;
       end;
     end;
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to