Skip to content

Conversation

@yohannd1
Copy link

Fixes #8205. Or it should, at least.
Since VersionedSaveDialog::fileExistsQuery was only used in two places, I decided to repurpose it into a new function VersionedSaveDialog::checkOverwrite that acts more explicitly according to the check (I think).

@yohannd1 yohannd1 marked this pull request as draft January 12, 2026 03:08
@yohannd1 yohannd1 marked this pull request as ready for review January 12, 2026 03:11
@yohannd1
Copy link
Author

I actually have an idea that might make usage simpler, by embedding the checks and the extra extension handling inside of the save file dialog, but that might be too much for me (would need modifying of both VersionedFileDialog and FileDialog, and probably overriding the exec method).

@yohannd1
Copy link
Author

There is still one case where this doesn't work, though it is harmless (although quite a bit confusing).
Using now the project save dialog: if you save one file test.mmpz, then test.mpt, and try to save a third file test while selecting the format .mpt in the dropdown, it will ask you whether you want to overwrite test.mmpz. If you click yes, it will then go forward and ask you if you want to overwrite test.mpt, and that will be the one that will be actually overwritten.

@yohannd1 yohannd1 marked this pull request as draft January 13, 2026 00:59
@yohannd1
Copy link
Author

Found a regression: when you want to overwrite a file with an extension already, or when saving through the default extension and without typing an extension, it'll ask twice if you want to overwrite this. Similar to issue I mentioned before, but this is actually fixable without having to modify other code.
Probably will send in a fix for this next week.

@sakertooth
Copy link
Contributor

I submitted my own fix at #8212 for this. I focused on only addressing the issue where the selected name filter extension isn't used as a fallback when no extension is in the filename. There are other issues (some of which you have already found here) that can still use some attention though. It also does some refactoring to make a code a little bit easier to understand.

Let me know if you're fine with closing this (if you want to go forward with my solution).

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.

Extension-less exports always become WAVs

2 participants