Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/02/10 11:28:00 (14 years ago)
Author:
mkommend
Message:

added tooltips for graph visualization buttons and fixed layouting problems (ticket #867)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/GraphVisualizationInfoView.cs

    r2899 r2909  
    3535using HeuristicLab.MainForm.WindowsForms;
    3636using HeuristicLab.Collections;
     37using System.Diagnostics;
     38using System.Threading;
    3739
    3840namespace HeuristicLab.Operators.Views.GraphVisualization {
     
    335337        this.graphVisualization.Controller.RunActivity(layoutName);
    336338        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        }
    337350      }
    338351    }
Note: See TracChangeset for help on using the changeset viewer.