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]

Choose a reason for hiding this comment

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

Done. Changed it to self.editor.frames.pop(self.old_name, None)

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

Choose a reason for hiding this comment

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

Done. I added the AttributeError exception when the dictionary entry cannot be found. The general exception is still there in case I missed something.

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

Choose a reason for hiding this comment

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

Done. Impleneted an error pop-up. Had to insert another check source_name != new_name. Otherwise, an error will pop up every time someone clicks on the box without actually inserting something.

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

Copy link

@cellios-fbr cellios-fbr Jan 19, 2026

Choose a reason for hiding this comment

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

Still Open.
That is true. I've tried to stick as closely as possible to the source code and was inspired by the function get_valid_frame_name(). I would leave it as is for now, unless you see it differently

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

Choose a reason for hiding this comment

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

Done. Implemented the suggestion

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

Choose a reason for hiding this comment

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

Done. Implemented suggestion

@Vorsten Vorsten requested a review from ipa-danb January 28, 2026 09:21
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