Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[STCC-307] Standard setRotationStyle wrong conversion #224

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/scratchtocatrobat/converter/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2025,12 +2025,12 @@ def _add_default_behaviour_to(sprite, sprite_context, catrobat_scene, catrobat_p
rotation_style = scratch_object.get_rotationStyle()
if rotation_style is not None:
traverser = _BlocksConversionTraverser(sprite, catrobat_project)
if rotation_style == "leftRight":
set_rotation_style_brick = traverser._converted_helper_brick_or_formula_element(["left-right"], "setRotationStyle")
if rotation_style == "left-right":
set_rotation_style_brick = traverser._converted_helper_brick_or_formula_element([rotation_style], "setRotationStyle")
assert set_rotation_style_brick is not None
implicit_bricks_to_add += [set_rotation_style_brick]
elif rotation_style == "none":
set_rotation_style_brick = traverser._converted_helper_brick_or_formula_element(["don't rotate"], "setRotationStyle")
elif rotation_style == "don't rotate":
set_rotation_style_brick = traverser._converted_helper_brick_or_formula_element([rotation_style], "setRotationStyle")
assert set_rotation_style_brick is not None
implicit_bricks_to_add += [set_rotation_style_brick]

Expand Down