[JEDI.NET-commits] main/run Jedi.Collections.pas,1.3,1.4
Status: Pre-Alpha
Brought to you by:
jedi_mbe
From: Marcel B. <jed...@us...> - 2004-08-25 18:56:29
|
Update of /cvsroot/jedidotnet/main/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4246/main/run Modified Files: Jedi.Collections.pas Log Message: * SubPropertyTypeConverter.ConvertTo now checks if it should use the provded value or that of the real property. Fixes problems with drop down lists at the item property level. * The UITypeEditor for the ItemSubPropertyDescriptor is only set to the SubPropertyUITypeEditor if the editor attribute was actually used for the real property or the type it represents. Fixes problems with drop down lists at the item property level. Index: Jedi.Collections.pas =================================================================== RCS file: /cvsroot/jedidotnet/main/run/Jedi.Collections.pas,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Jedi.Collections.pas 25 Aug 2004 15:14:56 -0000 1.3 --- Jedi.Collections.pas 25 Aug 2004 18:56:12 -0000 1.4 *************** *** 550,554 **** begin pd := ItemSubPropertyDescriptor(context.PropertyDescriptor).RealDescriptor; ! propValue := pd.GetValue(ItemSubPropertyDescriptor(context.PropertyDescriptor).ItemInstance(context.Instance)); Result := FPropertyConverter.ConvertTo(SubPropertyContext.Create(context), culture, propValue, destinationType); end --- 550,557 ---- begin pd := ItemSubPropertyDescriptor(context.PropertyDescriptor).RealDescriptor; ! if value = context.PropertyDescriptor.GetValue(context.Instance) then ! propValue := pd.GetValue(ItemSubPropertyDescriptor(context.PropertyDescriptor).ItemInstance(context.Instance)) ! else ! propValue := value; Result := FPropertyConverter.ConvertTo(SubPropertyContext.Create(context), culture, propValue, destinationType); end *************** *** 723,727 **** EditorAttribute.Create(TypeOf(SubPropertyUITypeEditor), TypeOf(UITypeEditor)) ), ! AttributeCombineOperation.AddAndReplace ) else --- 726,730 ---- EditorAttribute.Create(TypeOf(SubPropertyUITypeEditor), TypeOf(UITypeEditor)) ), ! AttributeCombineOperation.Replace ) else *************** *** 736,740 **** EditorAttribute.Create(TypeOf(SubPropertyUITypeEditor), TypeOf(UITypeEditor)) ), ! AttributeCombineOperation.AddAndReplace ); inherited Create(componentType, name, itemType, --- 739,743 ---- EditorAttribute.Create(TypeOf(SubPropertyUITypeEditor), TypeOf(UITypeEditor)) ), ! AttributeCombineOperation.Replace ); inherited Create(componentType, name, itemType, |