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 save copy callback not called when confirmation popup used, minor refactoring #6761

Merged
merged 5 commits into from
Jun 25, 2023

Conversation

Robyt3
Copy link
Member

@Robyt3 Robyt3 commented Jun 25, 2023

When using "Save Copy" to save a copy of the current map to a new file and selecting a file that already exists, a confirmation popup is shown. However, this confirmation popup did not differentiate between regular saving and saving a copy, so the regular save callback was always called.

Add the GET parameter w=1 to the URL of this PR to show simpler diff (ignoring whitespace).

Checklist

  • Tested the change ingame
  • Provided screenshots if it is a visual change
  • Tested in combination with possibly related configuration options
  • Written a unit test (especially base/) or added coverage to integration test
  • Considered possible null pointers and out of bounds array indexing
  • Changed no physics that affect existing maps
  • Tested the change with ASan+UBSan or valgrind's memcheck (optional)

The editor map has a pointer to the editor, which has a pointer to the storage, so it's not necessary to pass the storage separately.
When using "Save Copy" to save a copy of the current map to a new file and selecting a file that already exists, a confirmation popup is shown. However, this confirmation popup did not differentiate between regular saving and saving a copy, so the regular save callback was always called.
Copy link
Member

@def- def- left a comment

Choose a reason for hiding this comment

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

bors r+

@bors
Copy link
Contributor

bors bot commented Jun 25, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit bb773b9 into ddnet:master Jun 25, 2023
15 checks passed
@Robyt3 Robyt3 deleted the Editor-SaveCopy-Callback-Fix branch June 25, 2023 09:55
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.

None yet

2 participants