File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -104,6 +104,15 @@ public void Start(int totalWork) {
104104 OnUpdate ? . Invoke ( this ) ;
105105 }
106106
107+ /// <summary>
108+ /// Notifies that the process has been stopped (either finished or cancelled)
109+ /// </summary>
110+ public void Terminate ( )
111+ {
112+ total = done ;
113+ ReportDone ( 0 ) ;
114+ }
115+
107116 /// <summary>
108117 /// Updates the progress bar after some work has been performed. Thread-safe.
109118 /// </summary>
Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ public override void Render(Scene scene) {
101101 if ( MaximumRenderTimeMs . HasValue && nextIterTime > MaximumRenderTimeMs . Value ) {
102102 Logger . Log ( "Maximum render time exhausted." ) ;
103103 if ( EnableDenoiser ) DenoiseBuffers . Denoise ( ) ;
104+ progressBar . Terminate ( ) ;
104105 break ;
105106 }
106107
Original file line number Diff line number Diff line change @@ -222,6 +222,7 @@ public override void Render(Scene scene) {
222222 if ( MaximumRenderTimeMs . HasValue && nextIterTime > MaximumRenderTimeMs . Value ) {
223223 Logger . Log ( "Maximum render time exhausted." ) ;
224224 if ( EnableDenoiser ) denoiseBuffers . Denoise ( ) ;
225+ progressBar . Terminate ( ) ;
225226 break ;
226227 }
227228 timer . StartIteration ( ) ;
You can’t perform that action at this time.
0 commit comments