1 /* Copyright 2000 Kjetil S. Matheussen
3 This program is free software; you can redistribute it and/or
4 modify it under the terms of the GNU General Public License
5 as published by the Free Software Foundation; either version 2
6 of the License, or (at your option) any later version.
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
23 #include "nsmtracker.h"
25 #include "clipboard_range_copy_proc.h"
26 #include "fxlines_proc.h"
27 #include "placement_proc.h"
30 #include "undo_fxs_proc.h"
38 struct Tracker_Windows
*window
,
39 struct WBlocks
*wblock
,
40 struct WTracks
*wtrack
,
46 struct Tracker_Windows
*window
,
52 Place
*p1
=PlaceGetFirstPos();
54 struct Undo_FXs
*undo_fxs
=talloc(sizeof(struct Undo_FXs
));
56 PlaceSetLastPos(block
,&p2
);
58 CopyRange_fxs(&undo_fxs
->fxs
,track
->fxs
,p1
,&p2
);
59 if(track
->instrumentdata
!=NULL
){
60 undo_fxs
->instrumentdata
=(*track
->instrument
->CopyInstrumentData
)(track
);
74 void Undo_FXs_CurrPos(
75 struct Tracker_Windows
*window
77 Undo_FXs(window
,window
->wblock
->block
,window
->wblock
->wtrack
->track
,window
->wblock
->curr_realline
);
81 struct Tracker_Windows
*window
,
82 struct WBlocks
*wblock
,
83 struct WTracks
*wtrack
,
87 struct Undo_FXs
*undo_fxs
=(struct Undo_FXs
*)pointer
;
91 struct Tracks
*track
=wtrack
->track
;
94 instrumentdata
=track
->instrumentdata
;
96 track
->fxs
=undo_fxs
->fxs
;
97 track
->instrumentdata
=undo_fxs
->instrumentdata
;
99 UpdateFXNodeLines(window
,wblock
,wtrack
);
102 undo_fxs
->instrumentdata
=instrumentdata
;