private void OnRemoveClause(ClauseViewModel clause)
        {
            clause.PropertyChanged -= OnClauseChanged;
            Clauses.Remove(clause);

            foreach (var c in Clauses)
            {
                c.IsFirst   = Clauses.IndexOf(c) == 0;
                c.IsGrouped = false;
            }
        }
        private void AddClause(int index)
        {
            var newClause = new ClauseViewModel();

            newClause.PropertyChanged += OnClauseChanged;

            Clauses.Insert(index, newClause);

            foreach (var c in Clauses)
            {
                c.IsFirst   = Clauses.IndexOf(c) == 0;
                c.IsGrouped = false;
            }
        }
        private void OnAddClause(ClauseViewModel clause)
        {
            var index = Clauses.IndexOf(clause);

            AddClause(index + 1);
        }