Ignore:
Timestamp:
03/10/20 16:00:19 (4 years ago)
Author:
bnemhaus
Message:

Fixed an issue with saving (and subsequent loading) of new SampledTrack widgets.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/apollo/widgets/SampledTrack.java

    r1434 r1516  
    814814               
    815815                if (trackModel != null && trackModel.getFilepath() != null &&
    816                                 trackModel.equals(f.getPath())) {
     816                                trackModel.getFilepath().equals(f.getPath())) {
    817817                       
    818818                        // already have loaded
     
    968968                // If saving for the file time then get a filename
    969969                if (trackModel.getFilepath() == null) {
    970                         File audioResource = ResourceManager.getAudioResource(localFileName, DisplayController.getCurrentFrame());
     970                        Frame parentFrame = this.getParentFrame();
     971                        File audioResource = ResourceManager.getAudioUnusedFilename(localFileName, parentFrame);
    971972                        trackModel.setFilepath(audioResource.getAbsolutePath());
    972973                        loadFilenameArgument = localFileName; // set to now local, next load will be local
     
    10601061                //File oldLocalFile = new File(AudioPathManager.AUDIO_HOME_DIRECTORY + localFileName);
    10611062                File oldLocalFile = ResourceManager.getAudioResource(localFileName, getParentFrame());
     1063               
     1064                if (oldLocalFile == null) {
     1065                        //It was never saved and therefore does not need to be deleted.
     1066                        return;
     1067                }
     1068               
    10621069                if (oldLocalFile.isFile() && oldLocalFile.exists()) {
    10631070                        try {
Note: See TracChangeset for help on using the changeset viewer.