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. */
22 #include "nsmtracker.h"
24 #include "placement_proc.h"
25 #include "clipboard_range_copy_proc.h"
26 #include "list_proc.h"
27 #include "trackreallines_proc.h"
37 struct Tracker_Windows
*window
,
38 struct WBlocks
*wblock
,
39 struct WTracks
*wtrack
,
45 struct Tracker_Windows
*window
,
50 Place
*p1
=PlaceGetFirstPos();
52 struct Undo_Notes
*undo_notes
=talloc(sizeof(struct Undo_Notes
));
54 PlaceSetLastPos(block
,&p2
);
56 CopyRange_stops(&undo_notes
->stops
,track
->stops
,p1
,&p2
);
57 CopyRange_notes(&undo_notes
->notes
,track
->notes
,p1
,&p2
);
59 Undo_New(window
->l
.num
,block
->l
.num
,track
->l
.num
,realline
,undo_notes
,Undo_Do_Notes
);
62 void Undo_Notes_CurrPos(
63 struct Tracker_Windows
*window
65 Undo_Notes(window
,window
->wblock
->block
,window
->wblock
->wtrack
->track
,window
->wblock
->curr_realline
);
70 struct Tracker_Windows
*window
,
71 struct WBlocks
*wblock
,
72 struct WTracks
*wtrack
,
76 struct Undo_Notes
*undo_notes
=(struct Undo_Notes
*)pointer
;
80 struct Tracks
*track
=wtrack
->track
;
85 track
->notes
=undo_notes
->notes
;
86 track
->stops
=undo_notes
->stops
;
88 undo_notes
->stops
=stemp
;
89 undo_notes
->notes
=ntemp
;
91 UpdateTrackReallines(window
,wblock
,wtrack
);