Changeset - 365cbd130bf2
[Not reviewed]
Tess Snider (Malkyne) - 3 years ago 2021-07-26 09:20:37
this@malkyne.org
Now correctly clearing buffer reagent selections when doing a test Clear.
Also, marking inert now immediately saves, because a verification step
is not necessary or useful, in this case.
3 files changed with 10 insertions and 5 deletions:
0 comments (0 inline, 0 general)
Models/ReactionTest.cs
Show inline comments
...
 
@@ -279,6 +279,7 @@ namespace DesertPaintCodex.Models
 
        {
 
            Reaction = new Reaction(0, 0, 0);
 
            State = TestState.GoodResult;
 
            SaveReaction();
 
        }
 

	
 
        public void ClearReaction()
...
 
@@ -291,11 +292,15 @@ namespace DesertPaintCodex.Models
 
            {
 
                profile.Save();
 
            }
 

	
 
            BufferReagentFirst = null;
 
            BufferReagentLast = null;
 
            
 
            Reaction = null;
 
            BadReaction = null;
 
            Clipped = ClipType.None;
 
            State = TestState.Untested;
 
            
 
            UpdateRecipe();
 
        }
 

	
ViewModels/ExperimentLogViewModel.cs
Show inline comments
...
 
@@ -61,6 +61,7 @@ namespace DesertPaintCodex.ViewModels
 
            TestView.SaveReaction.Subscribe(_ => OnSaveReaction());
 
            TestView.ClearReaction.Subscribe(_ => OnClearReaction());
 
            TestView.FinalizeTestResults.Subscribe(_ => OnReactionResults());
 
            TestView.MarkInert.Subscribe(_ => OnSaveReaction());
 
        }
 

	
 
        private ReactionTest GetSelectedReactionTest()
ViewModels/ReactionTestViewModel.cs
Show inline comments
...
 
@@ -46,6 +46,7 @@ namespace DesertPaintCodex.ViewModels
 
            ShowScreenSettingsDialog = new Interaction<ScreenSettingsViewModel, Unit>();
 
            SaveReaction = ReactiveCommand.Create(() => ReactionTest.SaveReaction());
 
            ClearReaction = ReactiveCommand.Create(() => ReactionTest.ClearReaction());
 
            MarkInert = ReactiveCommand.Create(() => ReactionTest.MarkInert());
 
            FinalizeTestResults = ReactiveCommand.Create(Test);
 
        }
 

	
...
 
@@ -109,11 +110,6 @@ namespace DesertPaintCodex.ViewModels
 
            }
 
        }
 

	
 
        public void MarkInert()
 
        {
 
            ReactionTest.MarkInert();
 
        }
 

	
 
        public void CancelScan()
 
        {
 
            ReactionTest.CancelScan();
...
 
@@ -148,6 +144,9 @@ namespace DesertPaintCodex.ViewModels
 

	
 
        public ReactiveCommand<Unit, Unit> ClearReaction { get; }
 
        public ReactiveCommand<Unit, Unit> SaveReaction { get; }
 
        
 
        public ReactiveCommand<Unit, Unit> MarkInert { get; }
 
        
 
        public ReactiveCommand<Unit, Unit> FinalizeTestResults { get; }
 
    }
 
}
...
 
\ No newline at end of file
0 comments (0 inline, 0 general)