Changeset 2497


Ignore:
Timestamp:
3/14/2012 1:53:13 AM (2 years ago)
Author:
lowjoel
Message:

Cache the last returned progress for each erasure target, since our SteppedProgressManager? expects that the Progress property will always be valid throughout the lifetime of the object.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/pluginsRewrite/Eraser.Manager/Task.cs

    r2491 r2497  
    378378            get 
    379379            { 
    380                 return Target.Progress; 
     380                ProgressManagerBase targetProgress = Target.Progress; 
     381                if (targetProgress != null) 
     382                    TargetProgress = targetProgress; 
     383 
     384                return TargetProgress; 
    381385            } 
    382386            set 
     
    394398            private set; 
    395399        } 
     400 
     401        /// <summary> 
     402        /// Caches a copy of the progress object for the Target. This is so that 
     403        /// for as long we our object is alive we can give valid information 
     404        /// (as required by the SteppedProgressManager class) 
     405        /// </summary> 
     406        private ProgressManagerBase TargetProgress; 
    396407    } 
    397408 
Note: See TracChangeset for help on using the changeset viewer.