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

When duplicating a project, ask for the new name and if link with game should be kept #7253

Merged
merged 13 commits into from
Dec 19, 2024

Conversation

AlexandreSi
Copy link
Collaborator

image

@AlexandreSi AlexandreSi requested a review from 4ian as a code owner December 19, 2024 11:33
@@ -314,7 +314,7 @@ const CreateSection = ({
const isCurrentProjectOpened =
!!project &&
!!currentFileMetadata &&
fileMetadata.gameId === currentFileMetadata.gameId;
fileMetadata.fileIdentifier === currentFileMetadata.fileIdentifier;
Copy link
Owner

Choose a reason for hiding this comment

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

Good catch

let originalProjectUuid = null;
if (newSaveAsOptions && newSaveAsOptions.generateNewProjectUuid) {
originalProjectUuid = currentProject.getProjectUuid();
currentProject.resetProjectUuid();
Copy link
Collaborator

Choose a reason for hiding this comment

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

just double checking this will not affect the initial project? I assume not as we're not saving that project

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In my tests everything went fine, but I'll check again

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I confirm it's okay

@@ -243,7 +251,7 @@ export const generateOnSaveProjectAs = (
}
options.onStartSaving();

const gameId = saveAsLocation.gameId || project.getProjectUuid();
Copy link
Collaborator

Choose a reason for hiding this comment

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

why this change? was this not used?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I saw it used only once, above in generateOnChooseSaveProjectAsLocation. I felt like it was not onChooseSaveProjectAsLocation role to set the gameId. So I removed it.

@AlexandreSi AlexandreSi merged commit 16d94b5 into master Dec 19, 2024
5 of 6 checks passed
@AlexandreSi AlexandreSi deleted the add-copy-when-duplicate branch December 19, 2024 15:50
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.

3 participants