+2008-04-05 Ivan N. Zlatev <contact@i-nz.net>
+
+ * PropertyGridView.cs: Fix expansion via [+] misbehavior on
+ double-click. It expanded it once in the mouse down and then
+ again in the double-click handler.
+
2008-04-04 Ivan N. Zlatev <contact@i-nz.net>
* GridEntry.cs: ICustomTypeDescriptor support for PropertyOwner,
+
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
private Font bold_font;
private Brush inactive_text_brush;
private ListBox dropdown_list;
+ private Point last_click;
#if NET_2_0
private Padding dropdown_form_padding;
#endif
}
}
+ // [+] expanding is handled in OnMouseDown, so in order to prevent
+ // duplicate expanding ignore it here.
+ //
protected override void OnDoubleClick (EventArgs e)
{
- if (this.SelectedGridItem != null && this.SelectedGridItem.Expandable)
+ if (this.SelectedGridItem != null && this.SelectedGridItem.Expandable &&
+ !this.SelectedGridItem.PlusMinusBounds.Contains (last_click))
this.SelectedGridItem.Expanded = !this.SelectedGridItem.Expanded;
else
ToggleValue (this.SelectedGridItem);
protected override void OnMouseDown (MouseEventArgs e)
{
base.OnMouseDown (e);
+ last_click = e.Location;
if (this.RootGridItem == null)
return;