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
+1
View File
@@ -815,6 +815,7 @@ Connection=Connection
Convert pause to beats=Convert pause to beats
Convert selection to pause=Convert selection to pause
Convert selection to warp=Convert selection to Warp Segment
Convert selection to fake=Convert selection to Fake Segment
Copy=Copy
CourseSortOrder=Course Sort
Create New=Create New
+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;
}
}
+1
View File
@@ -386,6 +386,7 @@ public:
record,
convert_to_pause,
convert_to_warp,
convert_to_fake,
NUM_ALTER_MENU_CHOICES
};