Skip to content

Commit

Permalink
Forbid making root on inherited scenes, closes #24484
Browse files Browse the repository at this point in the history
  • Loading branch information
reduz committed Jan 22, 2019
1 parent 0c9fd3c commit cd45f05
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions editor/scene_tree_dock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,12 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {

//check that from node to root, all owners are right

if (root->get_scene_inherited_state().is_valid()) {
accept->set_text(TTR("Can't reparent nodes in inherited scenes, order of nodes can't change."));

This comment has been minimized.

Copy link
@bojidar-bg

bojidar-bg Jan 22, 2019

Contributor

I think you mean "Can't replace root from inherited scene" or something of the sort, since the error message is somewhat misleading right now (since the person is not reparenting nodes).

accept->popup_centered_minsize();
return;
}

if (node->get_owner() != root) {
accept->set_text(TTR("Node must belong to the edited scene to become root."));
accept->popup_centered_minsize();
Expand Down

0 comments on commit cd45f05

Please sign in to comment.