Commits

af08018  committed 79104a8

remove unnecessary filters

  • Participants
  • Parent commits d2b3b98

Comments (0)

Files changed (1)

File src/nl/tudelft/lime/figures/connection/ArcFigure.java

  */
 public class ArcFigure extends PolylineConnection {
     protected String typeName = "";
-
+    private Rectangle previousBounds = null;
     public ArcFigure() {
         setTargetDecoration(new PolylineDecoration());
     }
         repaint();
     }
 
-    /* (non-Javadoc)
+    
+	@Override
+	public Rectangle getBounds() {
+		if (previousBounds != null){
+			return previousBounds;
+		}
+		else
+			return super.getBounds();
+	}
+
+	/* (non-Javadoc)
      * @see org.eclipse.draw2d.Figure#paint(org.eclipse.draw2d.Graphics)
      */
     @Override
     public void paintFigure(Graphics graphics) {
         super.paintFigure(graphics);
-
         PointList points = getPoints();
 
         //we have at least two points - we assume that we would use the last two points as text show
         if (getBounds().width < textSize.width) {
             getBounds().expand(textSize.width - getBounds().width, 0);
         }
+        if (getBounds().height < textSize.height) {
+            getBounds().expand(0, textSize.height - getBounds().height);
+        }
 
         Point p = FigureUtility.centeredTextLocation(graphics, r,
                 this.typeName.length());
             p.x = getBounds().x;
         }
 
+        this.previousBounds = getBounds().getCopy();
         //		Dimension prefferedSize = textSize.union(bounds.getSize());
         //        setBounds(new Rectangle(bounds.getLocation(), prefferedSize));
         graphics.setBackgroundColor(new Color(null, 255, 255, 255));