Changeset 2909 for trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/GraphVisualizationInfoView.cs
- Timestamp:
- 03/02/10 11:28:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/GraphVisualizationInfoView.cs
r2899 r2909 35 35 using HeuristicLab.MainForm.WindowsForms; 36 36 using HeuristicLab.Collections; 37 using System.Diagnostics; 38 using System.Threading; 37 39 38 40 namespace HeuristicLab.Operators.Views.GraphVisualization { … … 335 337 this.graphVisualization.Controller.RunActivity(layoutName); 336 338 this.graphVisualization.Invalidate(); 339 340 //fix to avoid negative shape positions after layouting 341 Thread.Sleep(100); 342 int minX = this.graphVisualization.Controller.Model.Shapes.Min(s => s.Location.X); 343 int shiftX = minX < 0 ? Math.Abs(minX) + 50 : 0; 344 int minY = this.graphVisualization.Controller.Model.Shapes.Min(s => s.Location.Y); 345 int shiftY = minY < 0 ? Math.Abs(minY) + 50 : 0; 346 if (minX < 0 || minY < 0) { 347 foreach (IShape s in this.Controller.Model.Shapes) 348 s.MoveBy(new Point(shiftX, shiftY)); 349 } 337 350 } 338 351 }
Note: See TracChangeset
for help on using the changeset viewer.