diff --git a/src/MyNet.UI/MyNet.UI.csproj b/src/MyNet.UI/MyNet.UI.csproj index 4c88879..7f42973 100644 --- a/src/MyNet.UI/MyNet.UI.csproj +++ b/src/MyNet.UI/MyNet.UI.csproj @@ -23,10 +23,10 @@ all - + - + diff --git a/src/MyNet.UI/ViewModels/List/ListViewModelBase.cs b/src/MyNet.UI/ViewModels/List/ListViewModelBase.cs index 5773c14..4bd7c72 100644 --- a/src/MyNet.UI/ViewModels/List/ListViewModelBase.cs +++ b/src/MyNet.UI/ViewModels/List/ListViewModelBase.cs @@ -75,7 +75,13 @@ protected ListViewModelBase( System.Reactive.Linq.Observable.FromEventPattern(x => Grouping.GroupingChanged += x, x => Grouping.GroupingChanged -= x).Subscribe(x => OnGroupChanged(x.EventArgs.GroupProperties)), System.Reactive.Linq.Observable.FromEventPattern(x => Paging.PagingChanged += x, x => Paging.PagingChanged -= x).Subscribe(x => OnPagingChanged(x.EventArgs.Page, x.EventArgs.PageSize)), Collection.WhenPropertyChanged(x => x.Count).Subscribe(_ => RaisePropertyChanged(nameof(Count))), - Collection.WhenPropertyChanged(x => x.Count).Subscribe(_ => RaisePropertyChanged(nameof(SourceCount))), + Collection.WhenPropertyChanged(x => x.SourceCount).Subscribe(_ => + { + RaisePropertyChanged(nameof(SourceCount)); + + if(!IsModifiedSuspender.IsSuspended) + SetIsModified(); + }), Collection, ]);