@@ -443,6 +443,7 @@ private void RefreshSumList()
443443 if ( ( SumResult . Sums != null ) && ( SumResult . Sums . Count > 0 ) )
444444 {
445445 SumView . Nodes . Clear ( ) ;
446+ List < TreeNode > tmpNodes = new List < TreeNode > ( ) ;
446447
447448 foreach ( SumResult sr in SumResult . Sums )
448449 {
@@ -462,10 +463,10 @@ private void RefreshSumList()
462463 if ( Options . CurrentOptions . HashOptions . SHA3_384 ) rootNode . Nodes . Add ( "SHA3-384: " + sr . SHA3_384 ) ;
463464 if ( Options . CurrentOptions . HashOptions . SHA3_512 ) rootNode . Nodes . Add ( "SHA3-512: " + sr . SHA3_512 ) ;
464465
465- SumView . Nodes . Add ( rootNode ) ;
466-
466+ tmpNodes . Add ( rootNode ) ;
467467 }
468468
469+ SumView . Nodes . AddRange ( tmpNodes . ToArray ( ) ) ;
469470 SumView . ExpandAll ( ) ;
470471 _allSums = SumView . Nodes . Cast < TreeNode > ( ) . ToArray ( ) ;
471472 }
@@ -943,6 +944,7 @@ private void CalculateSums(bool analyzeJson = false)
943944
944945 TreeNode rootNode = null ;
945946 _analyzedFiles = new List < string > ( ) ;
947+ List < TreeNode > tmpNodes = new List < TreeNode > ( ) ;
946948
947949 if ( analyzeJson )
948950 {
@@ -1014,10 +1016,7 @@ private void CalculateSums(bool analyzeJson = false)
10141016 if ( SumResult . Sums [ i ] . SHA3_512 == _fileSummaries [ i ] . SHA3_512 ) _analyzedFiles . Add ( _fileSummaries [ i ] . File ) ;
10151017 }
10161018
1017- SumView . Invoke ( ( MethodInvoker ) delegate
1018- {
1019- SumView . Nodes . Add ( rootNode ) ;
1020- } ) ;
1019+ tmpNodes . Add ( rootNode ) ;
10211020 }
10221021 }
10231022 else
@@ -1040,19 +1039,17 @@ private void CalculateSums(bool analyzeJson = false)
10401039 if ( Options . CurrentOptions . HashOptions . SHA3_384 ) rootNode . Nodes . Add ( "SHA3-384: " + SumResult . Sums [ i ] . SHA3_384 ) ;
10411040 if ( Options . CurrentOptions . HashOptions . SHA3_512 ) rootNode . Nodes . Add ( "SHA3-512: " + SumResult . Sums [ i ] . SHA3_512 ) ;
10421041
1043- SumView . Invoke ( ( MethodInvoker ) delegate
1044- {
1045- SumView . Nodes . Add ( rootNode ) ;
1046- } ) ;
1042+ tmpNodes . Add ( rootNode ) ;
10471043 }
10481044 }
10491045
1050- _allSums = SumView . Nodes . Cast < TreeNode > ( ) . ToArray ( ) ;
10511046 SumView . Invoke ( ( MethodInvoker ) delegate
10521047 {
1048+ SumView . Nodes . AddRange ( tmpNodes . ToArray ( ) ) ;
10531049 SumView . ExpandAll ( ) ;
10541050
10551051 } ) ;
1052+ _allSums = SumView . Nodes . Cast < TreeNode > ( ) . ToArray ( ) ;
10561053
10571054 lblCalculating . Invoke ( ( MethodInvoker ) delegate
10581055 {
@@ -1436,7 +1433,7 @@ private void FilterTable()
14361433
14371434 private void SumView_NodeMouseDoubleClick ( object sender , TreeNodeMouseClickEventArgs e )
14381435 {
1439-
1436+
14401437 }
14411438 }
14421439}
0 commit comments