X Tutup
Skip to content

Make FileSystemDock navigate to currently selected scene tab#109587

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
agbo-interactive:tle/file-explorer
Nov 14, 2025
Merged

Make FileSystemDock navigate to currently selected scene tab#109587
Repiteo merged 1 commit intogodotengine:masterfrom
agbo-interactive:tle/file-explorer

Conversation

@tle-oops
Copy link
Contributor

@tle-oops tle-oops commented Aug 13, 2025

This PR should address the linked issue below where changing tabs within the scene editor tabs node doesn't make File System Dock node auto-navigate to where the selected scene is located on disk.

Closes: godotengine/godot-proposals#9313

@tle-oops tle-oops requested a review from a team August 13, 2025 19:57
@tle-oops tle-oops marked this pull request as draft August 13, 2025 19:58
@tle-oops tle-oops marked this pull request as ready for review August 13, 2025 20:10
@tle-oops
Copy link
Contributor Author

tle-oops commented Aug 13, 2025

Referenced the wrong discussion in the description. Here's the correct one:
godotengine/godot-proposals#9313

corrected description link as well.

@AThousandShips AThousandShips changed the title Made FileSystemDock navigate to currently selected scene tab Make FileSystemDock navigate to currently selected scene tab Aug 13, 2025
@AThousandShips AThousandShips added this to the 4.x milestone Aug 13, 2025
@AThousandShips
Copy link
Member

This should be optional (defaulting to being disabled IMO), I personally don't want this feature enabled

@AThousandShips

This comment was marked as resolved.

@tle-oops

This comment was marked as resolved.

@AThousandShips

This comment was marked as resolved.

@KoBeWi

This comment was marked as resolved.

@AThousandShips

This comment was marked as resolved.

@ogapo
Copy link
Contributor

ogapo commented Aug 13, 2025

The proposal references VSCode at the top, and the behavior there is definitely selecting. I personally took that to be more or less synonymous with "hilighting". Not sure a visual change that didn't scroll to it would be much use at all.

@AThousandShips
Copy link
Member

That makes sense, in the general terminology "highlighting" would mean something different that's what's was confusing

@tle-oops tle-oops requested a review from a team as a code owner August 14, 2025 16:04
@KoBeWi
Copy link
Member

KoBeWi commented Aug 25, 2025

When changing scenes via quick open (Ctrl+Shift+O), the file does not get selected.

@tle-oops
Copy link
Contributor Author

tle-oops commented Sep 3, 2025

When changing scenes via quick open (Ctrl+Shift+O), the file does not get selected.

Looks like the signal for tab_changed is suppressed by this code here in EditorSceneTabs::_update_tab_titles()

int current_tab = EditorNode::get_editor_data().get_edited_scene();
if (scene_tabs->get_tab_count() > 0 && scene_tabs->get_current_tab() != current_tab) {
scene_tabs->set_block_signals(true);
scene_tabs->set_current_tab(current_tab);
scene_tabs->set_block_signals(false);
}

Not entirely sure if this is intentional? It seems to work correctly if I just remove the two block_signals calls.

@kitbdev
Copy link
Contributor

kitbdev commented Sep 4, 2025

Blocking the signal is intentional, as otherwise that method would get called again from the signal emitted from that method, potentially causing an infinite loop.
The EditorSceneTabs tab_changed signal is only intended to tell the EditorNode that a tab has been clicked via the tab bar, as the EditorNode is what handles the changing the scene. So this shouldn't use the signal, and instead be triggered from EditorNode::_set_current_scene_nocheck or somewhere.

@tle-oops
Copy link
Contributor Author

tle-oops commented Sep 5, 2025

I see!! thanks @kitbdev for the clarification.

Copy link
Member

@KoBeWi KoBeWi left a comment

Choose a reason for hiding this comment

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

Needs squashing.

@KoBeWi KoBeWi modified the milestones: 4.x, 4.6 Oct 15, 2025
@tle-oops
Copy link
Contributor Author

Needs squashing.

Hey I believe I've squashed to 1 commit - could you double check just in case?

@KoBeWi
Copy link
Member

KoBeWi commented Oct 22, 2025

You can see at the top:
image
Not squashed.

See https://contributing.godotengine.org/en/latest/organization/pull_requests/creating_pull_requests.html#the-interactive-rebase

@Repiteo Repiteo merged commit 0066308 into godotengine:master Nov 14, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Nov 14, 2025

Thanks! Congratulations on your first merged contribution! 🎉

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

X Tutup