Add "Convert Selection to Fake Segment" option.

Once again, do things math free.
This commit is contained in:
Jason Felds
2011-06-10 16:52:23 -04:00
parent 0db9f87b74
commit 9a258e7042
3 changed files with 13 additions and 1 deletions
+11 -1
View File
@@ -539,7 +539,9 @@ static MenuDef g_AlterMenu(
MenuRowDef(ScreenEdit::convert_to_pause, "Convert selection to pause", true,
EditMode_Full, true, true, 0, NULL ),
MenuRowDef(ScreenEdit::convert_to_warp, "Convert selection to warp", true,
EditMode_Full, true, true, 0, NULL )
EditMode_Full, true, true, 0, NULL ),
MenuRowDef(ScreenEdit::convert_to_fake, "Convert selection to fake", true,
EditMode_Full, true, true, 0, NULL )
);
static MenuDef g_AreaMenu(
@@ -3725,6 +3727,14 @@ void ScreenEdit::HandleAlterMenuChoice(AlterMenuChoice c, const vector<int> &iAn
SetDirty(true);
break;
}
case convert_to_fake:
{
float startBeat = NoteRowToBeat(m_NoteFieldEdit.m_iBeginMarker);
float lengthBeat = NoteRowToBeat(m_NoteFieldEdit.m_iEndMarker) - startBeat;
GetAppropriateTiming().SetFakeAtBeat(startBeat,lengthBeat);
SetDirty(true);
break;
}
}