I should state that because there was no Cancel in the audio location dialog, the attempt to cancel was done using the dialog's window exit button, and that does not necessarily translate to a Cancel.
Steps to reproduce:
- Open a new session
- Save it as /path/dir1/test/test.rg
- Use Audio Manager to Add a wav file. NB: At this point, RG still has no edits outstanding, and there is no change visible in the test directory
- Use Audio Manager to insert a wav file into the selected track.
- Now RG has edits requiring saving, and there are no changes in the test directory
- CTRL-S and up pops a dialog with at least five options about where to save audio files
- I wanted to Cancel and think about it...but no Cancel button?
- I chose to click the window manager's exit instead, and consider the offer as to how to organize the audio based on five options provided.
- On clicking the window exit, RG went ahead and not only created an audio directory on the file system (the default selected above), but saved the session as well i.e. the session which I no longer wanted to save at that point.
I'm not sure what the expected behavior should be in this case, but at least for me it is not the expected behavior. I think that there should be a Cancel button i.e. take that window away, don't save...don't do anything at that moment, especially not change the filesystem. Any thoughts?
This problem is due to the way the save code is organized. To fix this issue, we will need to rearrange the save code so that it proceeds as follows:
RosegardenDocument::saveDocument()AudioFileManager::save()The top level functions involved in this process:
RosegardenMainWindow::slotFileSave()RosegardenMainWindow::fileSaveAs()