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

Editor: Fixed wrong script title when editing shader #28444

Merged
merged 1 commit into from
May 21, 2024

Conversation

ycw
Copy link
Contributor

@ycw ycw commented May 20, 2024

The issue: When users edit shader in script editor, and then rename the material they're editing

then, the script title becomes ... {objectname} / undefined,

which should be ... {materialname} / XXX Shader.

The bug demo:

script.title.bugs.mp4

With this PR:

set.proper.script.title.mp4

Details:

  • Renaming material will dispatch materialChanged followed by objectChanged, so we've to guard objectChanged from setting title (this is the cause of the bug)

  • Added setTitle to set title in single place (yet l10n)

  • Added missing default in switches, this is not related to the bug, but I found it helpful during debugging.

@ycw ycw changed the title Editor: Fixed a script title bugs when editing shader Editor: Fixed wrong script title when editing shader May 20, 2024
@mrdoob mrdoob added this to the r165 milestone May 21, 2024
@mrdoob mrdoob merged commit 2e7e9d4 into mrdoob:dev May 21, 2024
11 checks passed
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.

2 participants