Set BlockGroupsEnabled based on group count

This commit is contained in:
azakhi 2019-09-04 21:08:26 +03:00
parent 785524f3ab
commit 8571e9ae65

View File

@ -624,6 +624,7 @@ namespace Filtration.ViewModels
Block.IsEdited = true; Block.IsEdited = true;
_parentScriptViewModel.SetDirtyFlag(); _parentScriptViewModel.SetDirtyFlag();
_parentScriptViewModel.Script.ItemFilterScriptSettings.BlockGroupsEnabled = true;
Messenger.Default.Send(new NotificationMessage<bool>(_parentScriptViewModel.ShowAdvanced, "BlockGroupsChanged")); Messenger.Default.Send(new NotificationMessage<bool>(_parentScriptViewModel.ShowAdvanced, "BlockGroupsChanged"));
UpdateBlockGroups(); UpdateBlockGroups();
@ -652,6 +653,11 @@ namespace Filtration.ViewModels
Messenger.Default.Send(new NotificationMessage<bool>(_parentScriptViewModel.ShowAdvanced, "BlockGroupsChanged")); Messenger.Default.Send(new NotificationMessage<bool>(_parentScriptViewModel.ShowAdvanced, "BlockGroupsChanged"));
UpdateBlockGroups(); UpdateBlockGroups();
if (BlockGroups.Count <= 0)
{
_parentScriptViewModel.Script.ItemFilterScriptSettings.BlockGroupsEnabled = false;
}
} }
} }