mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 19:23:59 +00:00
Fix interaction between useSharps and fVisuals
This commit is contained in:
parent
7c421e176a
commit
7597339b67
|
@ -131,7 +131,12 @@ VLNote::VLNote(VLFraction dur, int pitch)
|
||||||
|
|
||||||
void VLNote::Name(std::string & name, bool useSharps) const
|
void VLNote::Name(std::string & name, bool useSharps) const
|
||||||
{
|
{
|
||||||
name = PitchName(fPitch, useSharps && !(fVisual & kWantFlat));
|
if (fVisual & kWantSharp)
|
||||||
|
useSharps = true;
|
||||||
|
else if (fVisual & kWantFlat)
|
||||||
|
useSharps = false;
|
||||||
|
|
||||||
|
name = PitchName(fPitch, useSharps);
|
||||||
}
|
}
|
||||||
|
|
||||||
void VLNote::MakeRepresentable()
|
void VLNote::MakeRepresentable()
|
||||||
|
@ -327,7 +332,12 @@ static const char * kStepNames[] = {
|
||||||
|
|
||||||
void VLChord::Name(std::string & base, std::string & ext, std::string & root, bool useSharps) const
|
void VLChord::Name(std::string & base, std::string & ext, std::string & root, bool useSharps) const
|
||||||
{
|
{
|
||||||
base = PitchName(fPitch, useSharps && !(fVisual & kWantFlat));
|
if (fVisual & kWantSharp)
|
||||||
|
useSharps = true;
|
||||||
|
else if (fVisual & kWantFlat)
|
||||||
|
useSharps = false;
|
||||||
|
|
||||||
|
base = PitchName(fPitch, useSharps);
|
||||||
ext = "";
|
ext = "";
|
||||||
root = "";
|
root = "";
|
||||||
|
|
||||||
|
@ -399,7 +409,7 @@ void VLChord::Name(std::string & base, std::string & ext, std::string & root, bo
|
||||||
// Root
|
// Root
|
||||||
//
|
//
|
||||||
if (fRootPitch != kNoPitch)
|
if (fRootPitch != kNoPitch)
|
||||||
root = PitchName(fRootPitch, useSharps && !(fVisual & kWantFlat));
|
root = PitchName(fRootPitch, useSharps);
|
||||||
}
|
}
|
||||||
|
|
||||||
VLMeasure::VLMeasure()
|
VLMeasure::VLMeasure()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user