Skip to content

Commit

Permalink
Compare localized path against editor scene path when reloading
Browse files Browse the repository at this point in the history
  • Loading branch information
a-johnston committed Nov 27, 2024
1 parent bbc5469 commit 6b40183
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion editor/editor_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5911,8 +5911,11 @@ void EditorNode::_notify_nodes_scene_reimported(Node *p_node, Array p_reimported

void EditorNode::reload_scene(const String &p_path) {
int scene_idx = -1;

String lpath = ProjectSettings::get_singleton()->localize_path(p_path);

for (int i = 0; i < editor_data.get_edited_scene_count(); i++) {
if (editor_data.get_scene_path(i) == p_path) {
if (editor_data.get_scene_path(i) == lpath) {
scene_idx = i;
break;
}
Expand Down

0 comments on commit 6b40183

Please sign in to comment.