Update of /cvsroot/audacity/audacity-src/src
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv29699/src

Modified Files:
        Benchmark.cpp WaveTrack.cpp 
Log Message:
- Fix crash when pasting and 'Editing a clip can move other clips' enabled.
- Also EditClipCanMove now defaults to off.

Index: WaveTrack.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/WaveTrack.cpp,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -d -r1.102 -r1.103
--- WaveTrack.cpp       12 May 2007 05:11:17 -0000      1.102
+++ WaveTrack.cpp       2 Jul 2007 16:21:09 -0000       1.103
@@ -397,11 +397,16 @@
          {
             //printf("paste: CreateFromCopy(%f, %f, %i) returns false, 
quitting\n",
             //   clip_t0, clip_t1, (int)clip);
-
-            return false;
+            // JKC: July 2007, previously we did 'return false' here which
+            // could leave *dest undefined.
+            // I think this is dealing with clips that don't have any sequence 
content
+            // i.e. we don't copy cut lines and such - anyone like to explain 
more?
+            delete newClip;
+         }
+         else
+         {
+            newTrack->mClips.Append(newClip);
          }
-
-         newTrack->mClips.Append(newClip);
       }
    }
 
@@ -412,7 +417,7 @@
 
 bool WaveTrack::Paste(double t0, Track *src)
 {
-   bool editClipCanMove = true;
+   bool editClipCanMove = false;
    gPrefs->Read(wxT("/GUI/EditClipCanMove"), &editClipCanMove);
    
    //printf("paste: entering WaveTrack::Paste\n");
@@ -579,7 +584,7 @@
    if (t1 < t0)
       return false;
 
-   bool editClipCanMove = true;
+   bool editClipCanMove = false;
    gPrefs->Read(wxT("/GUI/EditClipCanMove"), &editClipCanMove);
 
    WaveClipList::Node* it;
@@ -1572,7 +1577,7 @@
 bool WaveTrack::ExpandCutLine(double cutLinePosition, double* cutlineStart,
                               double* cutlineEnd)
 {
-   bool editClipCanMove = true;
+   bool editClipCanMove = false;
    gPrefs->Read(wxT("/GUI/EditClipCanMove"), &editClipCanMove);
 
    // Find clip which contains this cut line   

Index: Benchmark.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Benchmark.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- Benchmark.cpp       29 May 2007 04:45:30 -0000      1.24
+++ Benchmark.cpp       2 Jul 2007 16:21:09 -0000       1.25
@@ -331,7 +331,7 @@
       return;
    }
 
-   bool editClipCanMove = true;
+   bool editClipCanMove = false;
    gPrefs->Read(wxT("/GUI/EditClipCanMove"), &editClipCanMove);
    gPrefs->Write(wxT("/GUI/EditClipCanMove"), false);
 


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to