-
Notifications
You must be signed in to change notification settings - Fork 834
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
close widgets when sending the blocks to trash #2155
Conversation
@walterbender please check out this PR |
We really only want to close the widget associated with the block we are deleting. |
Have you looked at the names? do they match? (The title string may not be the same as the internal block name) |
@walterbender I have added method that is working as we want it to. |
@@ -7051,6 +7050,9 @@ function Blocks(activity) { | |||
// console.debug('putting ' + this.blockList[blk].name + ' in the trash'); | |||
this.blockList[blk].trash = true; | |||
this.blockList[blk].hide(); | |||
var title = this.blockList[blk].protoblock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this static label always match the widget window title? Did you test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@walterbender yes, it does. I have already tested this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ishakikani9117 Please check it for rhythm maker.
If we send rhythm maker to trash , then widget window does not open for other rhythm maker block. Can you test this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@walterbender Also check for timbre , temperament widget. If once I move them to trash , the window not open for their other block .
One more issue :
Is this intentional if I have two open widget window and I move one of their block to trash but both widget window get closed .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a bug in how the window is hidden. style.display is never reset when the new widget tries to open. The bug was introduced by an earlier patch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@walterbender Also check for timbre , temperament widget. If once I move them to trash , the window not open for their other block .
One more issue :
Is this intentional if I have two open widget window and I move one of their block to trash but both widget window get closed .
@b18050 I tried your solution, the phrase maker and custom mode widget are not being closed even we sent it to trash. and for other blocks widget disappears when you sent blocks to trash ,but after 2 seconds or so,widget
shows up automatically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@walterbender Is it fixed now?
It is a bug in how the window is hidden. style.display is never reset when the new widget tries to open. The bug was introduced by an earlier patch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed a fix. Please test. (Should fix the same regression introduced by the new project button too.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@walterbender The widget window is not closing when block is send to trash.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@walterbender same issue as @Ishakikani9117 was telling . The widget window shows up automatically after 2 seconds or so. Probably , this is due to overwriting session data in activity.js
fixes #2145