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

Fixed the functionality of "New Project" in Planet #445

Merged
merged 2 commits into from
Dec 9, 2018
Merged

Fixed the functionality of "New Project" in Planet #445

merged 2 commits into from
Dec 9, 2018

Conversation

sdziuda
Copy link
Contributor

@sdziuda sdziuda commented Dec 8, 2018

No description provided.

@walterbender
Copy link
Member

Can you please explain what the bug was and what the fix is?

@sdziuda
Copy link
Contributor Author

sdziuda commented Dec 8, 2018

The bug was that the "New Project" button in Planet view was making the copy of the project that we were working on, instead of creating a blank page with no blocks. It's issue #426. I fixed it by deleting all blocks and refreshing the canvas to let it be blank.

@walterbender
Copy link
Member

You need to also load the default blocks.

@sdziuda
Copy link
Contributor Author

sdziuda commented Dec 8, 2018

Which blocks are the "default blocks"?

@walterbender
Copy link
Member

The _loadStart function should do everything you need.

@sdziuda
Copy link
Contributor Author

sdziuda commented Dec 8, 2018

Ok, thanks. I was looking for a function that is suitable for this and thought about using blocks.loadNewBlocks() function, but if you say that there is a function _loadStart, I'll use it.

@walterbender
Copy link
Member

loadNewBlocks does the loading, but _loadStart finds the blocks to load from turtledefs.js

Added the _loadStart function
@sdziuda
Copy link
Contributor Author

sdziuda commented Dec 9, 2018

Sorry for this taking me so long, but I a bit misunderstood what you've said (I thought that I have to load only "start" block while creating new project and I was thinking how to do it), but now it should work fine (all default blocks are loaded).

@walterbender walterbender merged commit 94f469d into sugarlabs:master Dec 9, 2018
@sdziuda sdziuda deleted the patch-1 branch December 9, 2018 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants