Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Openblocks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
letsgoING
ArduBlock Source
Openblocks
Commits
3746d23d
Commit
3746d23d
authored
May 4, 2022
by
Anian Bühler
Browse files
Options
Downloads
Patches
Plain Diff
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
!1
Dev preferences
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/edu/mit/blocks/codeblocks/InfixBlockShape.java
+39
-39
39 additions, 39 deletions
src/main/java/edu/mit/blocks/codeblocks/InfixBlockShape.java
with
39 additions
and
39 deletions
src/main/java/edu/mit/blocks/codeblocks/InfixBlockShape.java
+
39
−
39
View file @
3746d23d
...
@@ -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
());
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment