Menu

#1731 Cancel audio location dialog resulted in save plus filesystem changes

None
open
nobody
None
5
2025-09-22
2025-08-02
musewhirl
No

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:

  1. Open a new session
  2. Save it as /path/dir1/test/test.rg
  3. 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
  4. Use Audio Manager to insert a wav file into the selected track.
  5. Now RG has edits requiring saving, and there are no changes in the test directory
  6. CTRL-S and up pops a dialog with at least five options about where to save audio files
  7. I wanted to Cancel and think about it...but no Cancel button?
  8. 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.
  9. 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?

Discussion

  • Ted Felix

    Ted Felix - 2025-08-04
    • summary: Cancel audio loaction dialog resulted in save plus filesystem changes --> Cancel audio location dialog resulted in save plus filesystem changes
     
  • Ted Felix

    Ted Felix - 2025-09-22

    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:

    1. If this is a Save As, prompt for the Save As... filename.
    2. Do not actually do the .rg file save.
    3. If needed, prompt for the audio file location (AudioFileLocationDialog).
    4. If the user cancels the AFLD, bail from everything.
    5. Perform the .rg file save. RosegardenDocument::saveDocument()
    6. Perform the AudioFileManager "save" (which is more of a move). AudioFileManager::save()

    The top level functions involved in this process:

    • RosegardenMainWindow::slotFileSave()
    • RosegardenMainWindow::fileSaveAs()
     

Log in to post a comment.

MongoDB Logo MongoDB