File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,9 +50,15 @@ private void StartNextAnalysis()
5050 analysisWorker . WorkerReportsProgress = false ;
5151 analysisWorker . WorkerSupportsCancellation = false ;
5252 analysisWorker . DoWork += AnalysisWorker_DoWork ;
53- analysisWorker . RunWorkerCompleted += ( _ , _ ) =>
53+ analysisWorker . RunWorkerCompleted += ( _ , e ) =>
5454 {
5555 _analysisQueue . Dequeue ( ) ;
56+
57+ if ( e is { Cancelled : false , Result : null } )
58+ {
59+ WeakReferenceMessenger . Default . Send ( new FailureWithAnalysisCalculationMessage ( analysisPresentation . Analysis ) ) ;
60+ }
61+
5662 WeakReferenceMessenger . Default . Send < AnalysisQueueCountChangedMessage > ( ) ;
5763
5864 StartNextAnalysis ( ) ;
@@ -84,20 +90,18 @@ private void AnalysisWorker_DoWork (object? sender, DoWorkEventArgs e)
8490
8591 if ( result == null )
8692 {
87- WeakReferenceMessenger . Default . Send ( new FailureWithAnalysisCalculationMessage ( analysisPresentation . Analysis ) ) ;
8893 analysisPresentation . IsBusy = false ;
8994
9095 e . Result = null ;
9196 return ;
9297 }
9398
94- if ( analysisPresentation . Analysis is AnalysisFreq { CalculateBivariate : true } analysisFreqWithBivariate )
99+ if ( analysisPresentation . Analysis is AnalysisFreq { GroupBy . Count : > 0 , CalculateBivariate : true } analysisFreqWithBivariate )
95100 {
96101 var bivariateResult = _rservice . CalculateBivariate ( analysisFreqWithBivariate ) ;
97102
98103 if ( bivariateResult == null )
99104 {
100- WeakReferenceMessenger . Default . Send ( new FailureWithAnalysisCalculationMessage ( analysisPresentation . Analysis ) ) ;
101105 analysisPresentation . IsBusy = false ;
102106
103107 e . Result = null ;
You can’t perform that action at this time.
0 commit comments