Changeset 6029 for trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphVisualization
- Timestamp:
- 04/19/11 13:30:38 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphVisualization/OperatorShapeInfo.cs
r5445 r6029 32 32 [Storable] 33 33 private List<string> labels; 34 35 private object lockObject = new object(); 34 36 35 37 [StorableConstructor] … … 42 44 lineWidth = original.lineWidth; 43 45 title = original.title; 44 if (original.icon != null) icon = (Bitmap)original.icon.Clone(); 46 47 //mkommend: necessary because cloning a Bitmap is not threadsafe 48 //see http://stackoverflow.com/questions/1851292/invalidoperationexception-object-is-currently-in-use-elsewhere for further information 49 if (original.icon != null) { 50 lock (lockObject) { 51 icon = (Bitmap)original.icon.Clone(); 52 } 53 } 45 54 46 55 connectorNames = new List<string>(original.connectorNames); … … 231 240 this.Icon = operatorShape.Icon; 232 241 this.Collapsed = operatorShape.Collapsed; 233 234 //TODO update Connector and labels;235 242 } 236 243 }
Note: See TracChangeset
for help on using the changeset viewer.