-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix Widget block gets disable after Restore #4670 #4807
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
base: master
Are you sure you want to change the base?
Conversation
The pie menu's "Delete" button was calling an extra function, that.blocks.extract(), before calling that.blocks.sendStackToTrash(). The extract() function (which is meant to pull a block from the middle of a stack) was breaking the widget's internal state before it was even sent to the trash. The drag-and-drop delete function only calls sendStackToTrash(), which is why it worked correctly.
|
✅ All Jest tests passed! This PR is ready to merge. |
|
@kaiju-no-9 I have tested. Seems to be working fine 👍 |
|
@Commanderk3 Removing the |
|
@suryaanshah yes one should look for it if i does cause any issue but this was the only place cause the bug i went through all the code__base and rest all is working fine |
|
Yes, but. The extract is important when you are sending a block that is in a stack to the trash. To load the default project and then try sending the top note block to the trash. W/o your change, just the note block is sent to the trash. With your change, all of the note blocks are sent to the trash. |
|
I understood, will look forward to finding a better solution |
|
Here is my latest theory: the extract process is not pulling the "hidden" block at the end of the stack. (All clamp blocks have a hidden block attached... if it is not there, the clamp block will not execute.) |
|
@kaiju-no-9 were you able to test my hypothesis? |
The pie menu's "Delete" button was calling an extra function, that.blocks.extract(), before calling that.blocks.sendStackToTrash().

The extract() function (which is meant to pull a block from the middle of a stack) was breaking the widget's internal state before it was even sent to the trash. The drag-and-drop delete function only calls sendStackToTrash(), which is why it worked correctly.