Update of /cvsroot/audacity/audacity-src/src
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv6464
Modified Files:
Menus.cpp
Log Message:
As long as we don't have real mixdown functionality, disable copying stereo
audio into a mono track
Index: Menus.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Menus.cpp,v
retrieving revision 1.277
retrieving revision 1.278
diff -u -d -r1.277 -r1.278
--- Menus.cpp 18 Sep 2006 02:18:25 -0000 1.277
+++ Menus.cpp 19 Sep 2006 13:29:06 -0000 1.278
@@ -2521,9 +2521,22 @@
Track *n = iter.First();
Track *c = clipIter.First();
+
+ bool pastedSomething = false;
while (n && c) {
if (n->GetSelected()) {
+ // When trying to copy from stereo to mono track, show error and exit
+ // TODO: Automatically offer user to mix down to mono (unfortunately
+ // this is not easy to implement
+ if (c->GetLinked() && !n->GetLinked())
+ {
+ wxMessageBox(
+ _("Copying stereo audio into a mono track is not allowed."),
+ _("Error"), wxICON_ERROR, this);
+ break;
+ }
+
if (msClipProject != this && c->GetKind() == Track::Wave)
((WaveTrack *) c)->Lock();
@@ -2539,6 +2552,8 @@
n->Paste(t0, c);
+ pastedSomething = true;
+
// When copying from mono to stereo track, paste the wave form
// to both channels
if (n->GetLinked() && !c->GetLinked())
@@ -2569,12 +2584,15 @@
// TODO: What if we clicked past the end of the track?
- mViewInfo.sel0 = t0;
- mViewInfo.sel1 = t0 + msClipLen;
+ if (pastedSomething)
+ {
+ mViewInfo.sel0 = t0;
+ mViewInfo.sel1 = t0 + msClipLen;
- PushState(_("Pasted from the clipboard"), _("Paste"));
+ PushState(_("Pasted from the clipboard"), _("Paste"));
- RedrawProject();
+ RedrawProject();
+ }
}
void AudacityProject::OnPasteOver()
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs