Skip to content

Commit

Permalink
UpdateDataSource: dont asign if not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
meee1 committed Jul 27, 2023
1 parent 20ccfe2 commit ad15d23
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Utilities/ExtensionsMP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ public static Action<T> UpdateDataSource<T>(this BindingSource ctl, T input)
{
return obj =>
{
ctl.DataSource = input;
if (ctl.DataSource != (object)input)
ctl.DataSource = input;
ctl.ResetBindings(false);
};
}
Expand Down

0 comments on commit ad15d23

Please sign in to comment.