Skip to content
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

Locking isnt working if the node is witihin the Viewport #30910

Closed
Chaosus opened this issue Jul 29, 2019 · 4 comments · Fixed by #99994
Closed

Locking isnt working if the node is witihin the Viewport #30910

Chaosus opened this issue Jul 29, 2019 · 4 comments · Fixed by #99994

Comments

@Chaosus
Copy link
Member

Chaosus commented Jul 29, 2019

Godot version:
e4ec59b

OS/device including version:
Win10

Issue description:

bug

Steps to reproduce:

  • Create a viewport (2D or 3D)
  • Add node as a child
  • Try use these buttons
    image
@codecustard
Copy link
Contributor

case LOCK_SELECTED: {
undo_redo->create_action(TTR("Lock Selected"));
List<Node *> selection = editor_selection->get_selected_node_list();
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
if (!canvas_item || !canvas_item->is_inside_tree())
continue;
if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
continue;

In line 4074, it appears to be deliberate. Removing this check in the lock/unlock switch cases resolves the issue.

@akien-mga
Copy link
Member

As mentioned in #32446:

It was deliberately disabled by @reduz to fix some other bug #1383

@KoBeWi
Copy link
Member

KoBeWi commented Oct 30, 2020

Still valid in 5bb7c7c

Seeing how this is intended and the locking would be useless (you can't move/select nodes inside Viewport anyways...), we should just disable the button if it's unavailable, to avoid confusion..

@Flavelius
Copy link
Contributor

As my issue was closed, i'm pasting the link here (#44869), just to raise awareness that there are other more important and possibly linked issues, most importantly the missing scene handles and toolbar entries for controls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants