Fix several annoying edit mode bugs, mostly by fixing the Song copy

operator and the various uses of it.

- revert file from disk: keeps old BPM.  The BPMS on disk are added to
  the existing BPM information!
- edit mode turns X stepcharts into 2X when reverting
- sometimes edit mode loses an entire stepchart: open a stepchart,
  change to a new stepchart, exit without going back, original chart gone
- edit a chart, make a change in a different chart, exit from the first chart:
  change made in different chart doesn't revert
- normally, when you create a stepchart and don't save it after editting it,
  it is deleted.  however, if you create a stepchart, don't save it, and exit
  edit mode while looking at a different chart, the chart isn't deleted.

Some existing bugs are not fixed, though:
- delete the last stepchart for a step type.  CTD.
- Edit one of the fake doubles stepcharts for a song that doesn't have
  real doubles stepcharts.  Exit without doing anything.  CTD.  This is
  probably the same problem as the previous bug.
- delete a song or a steps that happens to be part of a trail.  Trail is now
  broken.  Some other edits should affect a trail as well, but don't.
This commit is contained in:
John Bauer
2006-11-10 07:02:27 +00:00
parent 00b40c7468
commit c3e39e12a3
8 changed files with 175 additions and 59 deletions
+5
View File
@@ -32,6 +32,11 @@ bool TrailEntry::operator== ( const TrailEntry &rhs ) const
Steps *TrailEntry::GetSteps() const
{
// TODO: There are a few bugs with the way we do trails right now.
// - If a steps (or an entire song) is deleted, possibly through the editor,
// this section will fail.
// - If the editor changes a stepchart's stats, that should also be reflected
// in the trail.
return m_StepsID.ToSteps( pSong, false );
}