<commit_before>﻿using System.ComponentModel.Composition;
using Plainion.Flames.Infrastructure.ViewModels;

namespace Plainion.Flames.Modules.Filters.ViewModels
{
    [Export]
    class OtherFiltersViewModel : ViewModelBase
    {
        private bool myInterpolateBrokenStackCalls;

        public bool InterpolateBrokenStackCalls
        {
            get { return myInterpolateBrokenStackCalls; }
            set
            {
                if( SetProperty( ref myInterpolateBrokenStackCalls, value ) )
                {
                    RemoveBrokenStacks();
                }
            }
        }

        private void RemoveBrokenStacks()
        {
            if( Presentation == null )
            {
                return;
            }

            var factory = new PresentationFactory();
            factory.InterpolateBrokenStackCalls = true;
            var presentation = factory.CreateFlameSetPresentation( TraceLog );

            ProjectService.Project.Presentation = presentation;
        }

        protected override void OnProjectChanging()
        {
            // set presentation already to null to ensure that we do not recalc flames by accident
            Presentation = null;

            // do not remember this setting - always start new tracelog without interpolation
            InterpolateBrokenStackCalls = false;
        }
    }
}<commit_msg>fixed InterpolateBrokenStacks (undo)<commit_after>﻿using System.ComponentModel.Composition;
using Plainion.Flames.Infrastructure.ViewModels;

namespace Plainion.Flames.Modules.Filters.ViewModels
{
    [Export]
    class OtherFiltersViewModel : ViewModelBase
    {
        private bool myInterpolateBrokenStackCalls;

        public bool InterpolateBrokenStackCalls
        {
            get { return myInterpolateBrokenStackCalls; }
            set
            {
                if( SetProperty( ref myInterpolateBrokenStackCalls, value ) )
                {
                    RemoveBrokenStacks();
                }
            }
        }

        private void RemoveBrokenStacks()
        {
            if( Presentation == null )
            {
                return;
            }

            var factory = new PresentationFactory();
            factory.InterpolateBrokenStackCalls = myInterpolateBrokenStackCalls;
            var presentation = factory.CreateFlameSetPresentation( TraceLog );

            ProjectService.Project.Presentation = presentation;
        }

        protected override void OnProjectChanging()
        {
            // set presentation already to null to ensure that we do not recalc flames by accident
            Presentation = null;

            // do not remember this setting - always start new tracelog without interpolation
            InterpolateBrokenStackCalls = false;
        }
    }
}
{'fraction_non_alphanumeric': 0.05752840909090909, 'fraction_numerical': 0.0, 'mean_word_length': 1.8311557788944723, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5013681', 'n_tokens_mistral': 701, 'n_tokens_neox': 672, 'n_words': 160}