[Lazarus] Bug (whis) at Procedure List : SOLVED, can anyone apply?

Martin lazarus at mfriebe.de
Thu Oct 29 03:01:42 CET 2009


A much better idea (imho)  would be, to add "all" and "none" *after 
sorting finished.

that way you would not rely on the name of them or anything like that.

  cbObjects.Sorted := true;
  cbObjects.Sorted := false;
  cbObjects.Items.Insert(0, lisPListAll);
  cbObjects.Items.Insert(1, lisPListNone);



Raistware wrote:
> Could anyone check this code and apply to SVN?
>
> ---
> diff --git a/ide/procedurelist.pas b/ide/procedurelist.pas
> index 9e578af..96d8ba9 100644
> --- a/ide/procedurelist.pas
> +++ b/ide/procedurelist.pas
> @@ -431,7 +431,8 @@ begin
>       end;
>     end;
>   finally
> -    cbObjects.ItemIndex := 0;   // select <All> as the default
> +    { select <All> as the default }
> +    cbObjects.ItemIndex := cbObjects.Items.IndexOf(lisPListAll);
>     if cbObjects.Text = '' then
>       cbObjects.ItemIndex := 1;
>   end;
>
> ---
>
> It solved the default item selected on bug on Procedure List. Default 
> selection should be 'All' at local language, but before this change, 
> the selection was allways the first item at list, at english is not a 
> problem, because 'All' usually is the first item at list, but at other 
> languages, like spanish: 'Todo' usually isn't the first item at list.
> With this modification the default item will be allways 'All' in local 
> language, solving that bug.
>
> Cheers,
>   Raul Ferriz
>
>
>
>
> __________ InformaciĆ³n de ESET NOD32 Antivirus, versiĆ³n de la base de 
> firmas de virus 4550 (20091028) __________
>
> ESET NOD32 Antivirus ha comprobado este mensaje.
>
> http://www.eset.com
>
>
>
> -- 
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus





More information about the Lazarus mailing list