EditableControl throws an exception on MouseDown
Brought to you by:
agaman
(Related to EditableControl.cs)
If EditableControl is in the middle of editing, and a MouseDown event is triggered - on some occasions _editNode=null (in EditableControl.HideEditor) executes just before EditableControl.ApplyChanges.
Exception then happens in BindableControl.GetMemberAdapter, first line (if (node.DataNode==null)... <-- node is null here)
IMHO this could fix it:
In EditableControl.cs, public virtual void ApplyChanges()
this line:
DoApplyChanges(_editNode, _editor);
should be changed to:
if (_editNode != null) DoApplyChanges(_editNode, _editor);
just to check if _editNode is non-null before continuing.
Thanks!
VekiPeki