Merge branch 'develop' of https://github.com/ProjectgroepA4/FestivalPlanner into develop
This commit is contained in:
@@ -172,8 +172,12 @@ public abstract class DrawObject implements Serializable
|
|||||||
{
|
{
|
||||||
Shape ownShape = getRectangle();
|
Shape ownShape = getRectangle();
|
||||||
Rectangle2D otherRectangle = object.getTransform().createTransformedShape(object.getImageRectangle()).getBounds2D();
|
Rectangle2D otherRectangle = object.getTransform().createTransformedShape(object.getImageRectangle()).getBounds2D();
|
||||||
if (ownShape.intersects(otherRectangle))
|
if(ownShape != null && otherRectangle != null) {
|
||||||
return true;
|
if (ownShape.intersects(otherRectangle))
|
||||||
|
return true;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user