-
Notifications
You must be signed in to change notification settings - Fork 20
feat: add renaming frames functionality, fix: crash when trying to delete a group #51
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: noetic-devel
Are you sure you want to change the base?
Conversation
ipa-danb
left a comment
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.
Need to check it out before merging (ill try to get to it next week)
| if self.editor.frames.get(self.old_name): | ||
| del self.editor.frames[self.old_name] |
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.
| if self.editor.frames.get(self.old_name): | |
| del self.editor.frames[self.old_name] | |
| self.editor.frames.pop(self.old_name, None): |
or
| if self.editor.frames.get(self.old_name): | |
| del self.editor.frames[self.old_name] | |
| if self.old_name in self.editor.frames: | |
| del self.editor.frames[self.old_name] |
| else: | ||
| try: | ||
| self.editor.command(Command_RenameElement(self.editor, self.editor.frames[request.source_name], request.new_name)) | ||
| except Exception as e: |
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.
could you specify the exception a bit more? I think here it should be key and attribute errors
| existing_editor_frames = set(self.editor.all_editor_frame_ids()) | ||
|
|
||
| # allow recreating if frame was published by frameditor node originally | ||
| if new_name in existing_editor_frames or (new_name in existing_tf_frames and not Frame.was_published_by_frameeditor(new_name)): |
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 would be nice to have an error popup here i think
| existing_tf_frames = set(self.editor.all_frame_ids()) | ||
| existing_editor_frames = set(self.editor.all_editor_frame_ids()) |
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.
i dont think it is required to make them into a set if you just check if an element is in the list
| if editor.active_frame is element: | ||
| self.was_active = True | ||
| else: | ||
| self.was_active = False |
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.
| if editor.active_frame is element: | |
| self.was_active = True | |
| else: | |
| self.was_active = False | |
| self.was_active = editor.active_frame is element |
| if self.editor.frames.get(self.new_name): | ||
| del self.editor.frames[self.new_name] |
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.
see above
Add the ability to rename a frame either by clicking the button or by directly clicking the frame name field.
Additionally, fix the bug that causes the system to crash when trying to delete a group.