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

Fix moving and renaming files #29459

Merged
merged 1 commit into from Jun 4, 2019
Merged

Conversation

@hpvb
Copy link
Member

hpvb commented Jun 4, 2019

This commit fixes several issues related to moving scenes and resources
in an open project.

  • Don't try to reload scenes while not all scenes are updated yet.
  • Don't use the UndoRedo system to update non-user initiated editor
    state.
  • Resave scenes after moving files and updating resource path(s).

Fixes #28012
Fixes #22230
Fixes #26394

Closes #26910 (superseded by this)

@hpvb hpvb added this to the 3.2 milestone Jun 4, 2019
@hpvb hpvb requested review from akien-mga and reduz Jun 4, 2019
@hpvb

This comment has been minimized.

Copy link
Member Author

hpvb commented Jun 4, 2019

@QbieShay Does this make sense to you too?

editor/editor_node.cpp Outdated Show resolved Hide resolved
@groud

This comment has been minimized.

Copy link
Contributor

groud commented Jun 4, 2019

Wow thanks ! I had hard time trying to understand why my changes to the Filesystem dock caused those issues. Glad you figured it out !

@QbieShay

This comment has been minimized.

Copy link
Contributor

QbieShay commented Jun 4, 2019

@hpvb Works for me! Thanks a lot!

print_verbose("FileSystem: calling rescan.");
_rescan();

print_verbose("FileSystem: saving moved scenes.");

This comment has been minimized.

Copy link
@reduz

reduz Jun 4, 2019

Member

you forgot a print :)

This comment has been minimized.

Copy link
@hpvb

hpvb Jun 4, 2019

Author Member

I added this because there's a print_verbose for 'calling rescan' also

This commit fixes several issues related to moving scenes and resources
in an open project.

* Don't try to reload scenes while not all scenes are updated yet.
* Don't use the UndoRedo system to update non-user initiated editor
state.
* Resave scenes after moving files and updating resource path(s).
@hpvb hpvb force-pushed the hpvb:fix-move-rename branch from be4faa7 to 0ac7715 Jun 4, 2019
@hpvb

This comment has been minimized.

Copy link
Member Author

hpvb commented Jun 4, 2019

After talking to @reduz I've made the new tab change methods on EditorNode protected and added FilesystemDock as a friend. I think this is good to go.

https://github.com/godotengine/godot/pull/29459/files#diff-6c5dc324a846b5dc5b3b8934b1130a5bR647

@akien-mga akien-mga merged commit daca2a9 into godotengine:master Jun 4, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@akien-mga

This comment has been minimized.

Copy link
Member

akien-mga commented Jun 4, 2019

Thanks a lot!

@groud

This comment has been minimized.

Copy link
Contributor

groud commented Jun 5, 2019

Would this fix #29215 too ?

@hpvb

This comment has been minimized.

Copy link
Member Author

hpvb commented Jun 5, 2019

@groud I don't think so, but I'm happy to have a look at that one.

@akien-mga

This comment has been minimized.

Copy link
Member

akien-mga commented Nov 12, 2019

Cherry-picked for 3.1.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.