Skip to content

Conversation

@Vorsten
Copy link

@Vorsten Vorsten commented Dec 15, 2025

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.

Copy link
Collaborator

@ipa-danb ipa-danb left a 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)

Comment on lines +216 to +217
if self.editor.frames.get(self.old_name):
del self.editor.frames[self.old_name]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if self.editor.frames.get(self.old_name):
del self.editor.frames[self.old_name]
self.editor.frames.pop(self.old_name, None):

or

Suggested change
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:
Copy link
Collaborator

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)):
Copy link
Collaborator

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

Comment on lines +751 to +752
existing_tf_frames = set(self.editor.all_frame_ids())
existing_editor_frames = set(self.editor.all_editor_frame_ids())
Copy link
Collaborator

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

Comment on lines +200 to +203
if editor.active_frame is element:
self.was_active = True
else:
self.was_active = False
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if editor.active_frame is element:
self.was_active = True
else:
self.was_active = False
self.was_active = editor.active_frame is element

Comment on lines +235 to +236
if self.editor.frames.get(self.new_name):
del self.editor.frames[self.new_name]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above

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.

3 participants