Forums
When you save a session for the first time, the save window doesn't display the file extension, only the session name.
So, if Qtractor is configured to save as .qtr by default (for example), MyProject.qtr doesn't appear; only MyProject does.
The problem is that even if you select a different format from the dropdown menu (qtt, for example), because it doesn't have the extension, it still saves as qtr.
It took me ages to realize that it wasn't my mistake when saving, since we generally want to save in the default format.
I think it would be solved if the default extension were added when saving. Then, the extension would change without issue when selecting a different format from the dropdown menu.
Regards and thanks for everything.
re. Minor inconvenience when saving projects...
yep, that's a long one, at least a decade long one :)
problem is, specially when saving a file, there isn't a known way to tell which filter is selected by the user when he/she hits the "Save" button (that I know at least).
I'll try to revisit this over to the QFileDialog docs or even ask the LLMs for some solution that doesn't end in a full rewrite of the file-requester dialogs all from scratch ;))
cheers
it seems to work
I meant sending the extension if it didn't exist, not figuring out the user's selection.
I've tried this and it seems to work:
qtractorMainForm.cpp line 2213
// Always avoid to store session on extracted directories... sFilename = sessionArchivePath(sFilename); // Try to rename as if a backup is about... sFilename = sessionBackupPath(sFilename); // NEW>> We ensure that filename adds the default extension if it is missing. if (! (sFilename.endsWith(".qtr") || sFilename.endsWith(".qts") || sFilename.endsWith(".qtz") || sFilename.endsWith(".qtt")) ) { sFilename = sFilename + "." + sExt; } #if 1//QT_VERSION < QT_VERSION_CHECK(4, 4, 0) sFilename = QFileDialog::getSaveFileName(pParentWidget, sTitle, sFilename, sFilter, nullptr, options); #elsere. Minor inconvenience when saving projects...
revisitation's over: check qtractor >= v1.5.12.1git.352c10
cheers
re. revisitation's over...
The advantage of my proposal is that it always makes the extension visible in the "filename" field; it doesn't hide the extension the first time it's saved.
It's also easier to understand and occupies only one continuous block of code.
I've realized that it's not necessary to include the ".qtt" format in the conditional statement. Since it's a template, Qtractor will never suggest it as an extension in an open file, so there's no risk of duplicating the extension when saving a second time.
It would look like this:
// Always avoid to store session on extracted directories... sFilename = sessionArchivePath(sFilename); // Try to rename as if a backup is about... sFilename = sessionBackupPath(sFilename); // NEW>> We ensure that filename adds the default extension if it is missing // and that it does not duplicate if it exists if (! (sFilename.endsWith(".qtr") || sFilename.endsWith(".qts") || sFilename.endsWith(".qtz")) ) { sFilename = sFilename + "." + sExt; } #if 1//QT_VERSION < QT_VERSION_CHECK(4, 4, 0) sFilename = QFileDialog::getSaveFileName(pParentWidget, sTitle, sFilename, sFilter, nullptr, options); #elseBut this is just my opinion; both options solve the problem.
Thanks :).
Both things are complementary
I've realized that both things are complementary.
Besides having control over the extension selector,
it would be great to always see the extension in the filename field.
As a user, this gives you peace of mind, because you can see exactly how it will be saved.
it's not over yet or is it?
maybe it is in qtractor >= v1.5.12.4git.9f36aa ?
this time the file extension/suffix will be there, enforced, always!
thanks
It works smoothly and precisely
Thank you
Oops!
After some further testing, I've discovered that Qtz files saved with previous versions of Qtractor won't open, while those generated by the new version will.
Conversely, the stable version of Qtractor won't open Qtz files saved with the new version. This is very strange because the Qtz files are correctly constructed (I verified this by renaming them to .zip and extracting them).
I don't know what change this started, because I wasn't opening any old documents.
(Edited) I don't think this is related:
I've also noticed some odd behavior. When a folder name starts with a number or a symbol (*, -, etc.), sometimes it recognizes it as a valid path and other times it doesn't.
Indeed
Happens on my machine, too. Cannot load older qtz. Older qtr sessions load fine.
re. qtr sessions load fine
If you extract the qtz file, the resulting .qts file also works correctly. The folder names, qts and qtz, are the same... everything seems fine, and yet... Very strange.
qtz load/save is repaired...
hopefully in qtractor >= v1.5.12.5git.93649f
thanks a lot for the heads-up!
cheers
re. qtz load/save is repaired...
That's right, I reported the error incorrectly. I was decompressing the .qtz file and I swear I was reading .qts files in the wrong sessions... But no, they were being saved as .qtr files. We read in blocks, we don't spell things out, and we tend to read more of what we expect to find than what's actually written.
I haven't tested it yet, but it seems to be working fine now.
Thanks again.
re: qtz load/save is repaired
Works again on my machine.
Add new comment