Skip to content
Snippets Groups Projects
Commit 3746d23d authored by Anian Bühler's avatar Anian Bühler
Browse files

added test-if-null for second default block in double-infix blocks

parent 06850512
No related branches found
No related tags found
1 merge request!1Dev preferences
...@@ -117,8 +117,9 @@ public class InfixBlockShape extends BlockShape { ...@@ -117,8 +117,9 @@ public class InfixBlockShape extends BlockShape {
//TODO: check why RBlock on second connector is always NULL??? //TODO: check why RBlock on second connector is always NULL???
RenderableBlock connectedRBlock = rb.getWorkspace().getEnv().getRenderableBlock(curSocket.getBlockID()); RenderableBlock connectedRBlock = rb.getWorkspace().getEnv().getRenderableBlock(curSocket.getBlockID());
if(connectedRBlock != null) {//added for second default block in double-infix block letsgoING
//calculate and update the new socket point //calculate and update the new socket point
//update the socket point of this cursocket which should now adopt the plug socket point of its //update the socket point of this which should now adopt the plug socket point of its
//connected block since we're also adopting the left side of its shape //connected block since we're also adopting the left side of its shape
//Use coordinates when the zoom level is 1.0 to calculate socket point //Use coordinates when the zoom level is 1.0 to calculate socket point
...@@ -154,8 +155,7 @@ public class InfixBlockShape extends BlockShape { ...@@ -154,8 +155,7 @@ public class InfixBlockShape extends BlockShape {
maxX = (float) gpBottom.getCurrentPoint().getX(); maxX = (float) gpBottom.getCurrentPoint().getX();
} }
gpBottom.lineTo(maxX, (float) gpBottom.getCurrentPoint().getY()); gpBottom.lineTo(maxX, (float) gpBottom.getCurrentPoint().getY());
}
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment