Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed saving Max release tail to the organ preset https://github.com/GrandOrgue/grandorgue/issues/1804 #1866

Merged
merged 1 commit into from
Apr 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- Fixed saving Max release tail to the organ preset https://github.com/GrandOrgue/grandorgue/issues/1804
- Fixed required package names in the BUILD.md file https://github.com/GrandOrgue/grandorgue/issues/1799
- Added support of macOS on Apple silicon. GrandOrgue for macOS on Apple silicon requires macOS 14 or higher. GrandOrgue for macOS on Intel requires macOS 12.1 or higher. https://github.com/GrandOrgue/grandorgue/discussions/1153
- Added ad-hoc code signing of GrandOrgue for macOS https://github.com/GrandOrgue/grandorgue/issues/1835
Expand Down
13 changes: 2 additions & 11 deletions src/grandorgue/GODocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ bool GODocument::LoadOrgan(
CloseOrgan();
return false;
}
m_sound.GetSettings().AddOrgan(m_OrganController->GetOrganInfo());
cfg.AddOrgan(m_OrganController->GetOrganInfo());
cfg.Flush();
{
wxCommandEvent event(wxEVT_SETVALUE, ID_METER_AUDIO_SPIN);
event.SetInt(m_OrganController->GetVolume());
Expand All @@ -73,16 +74,6 @@ bool GODocument::LoadOrgan(
m_sound.GetEngine().SetVolume(m_OrganController->GetVolume());
}

// synchronize cfg.ReleaseTail with OrganReleaseTail.
unsigned cfgReleaseTail = cfg.ReleaseLength();
unsigned organReleaseTail = m_OrganController->GetReleaseTail();

if (organReleaseTail) // organReleaseTail has the priority
cfg.ReleaseLength(organReleaseTail);
else if (cfgReleaseTail)
m_OrganController->SetReleaseTail(cfgReleaseTail);
cfg.Flush();

wxCommandEvent event(wxEVT_WINTITLE, 0);
event.SetString(m_OrganController->GetChurchName());
wxTheApp->GetTopWindow()->GetEventHandler()->AddPendingEvent(event);
Expand Down
4 changes: 1 addition & 3 deletions src/grandorgue/GOFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ GOFrame::GOFrame(
wxDefaultSize,
choices);
m_ToolBar->AddControl(m_ReleaseLength);
UpdateReleaseLength(m_config.ReleaseLength());
UpdateReleaseLength(0);

m_ToolBar->AddTool(
ID_TRANSPOSE,
Expand Down Expand Up @@ -492,8 +492,6 @@ void GOFrame::UpdateReleaseLength(unsigned releaseLength) {

if (organController && organController->GetReleaseTail() != releaseLength)
organController->SetReleaseTail(releaseLength);
if (m_config.ReleaseLength() != releaseLength)
m_config.ReleaseLength(releaseLength);
if (m_ReleaseLength->GetSelection() != releaseLengthIndex)
m_ReleaseLength->SetSelection(releaseLengthIndex);
}
Expand Down
1 change: 0 additions & 1 deletion src/grandorgue/config/GOConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ GOConfig::GOConfig(wxString instance)
PolyphonyLimit(
this, wxT("General"), wxT("PolyphonyLimit"), 0, MAX_POLYPHONY, 2048),
Preset(this, wxT("General"), wxT("Preset"), 0, MAX_PRESET, 0),
ReleaseLength(this, wxT("General"), wxT("ReleaseLength"), 0, 3000, 0),
LanguageCode(this, wxT("General"), wxT("Language"), wxEmptyString),
BitsPerSample(this, wxT("General"), wxT("BitsPerSample"), 8, 24, 24),
Transpose(this, wxT("General"), wxT("Transpose"), -11, 11, 0),
Expand Down
1 change: 0 additions & 1 deletion src/grandorgue/config/GOConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ class GOConfig : public GOSettingStore, public GOOrganList {
GOSettingInteger Volume;
GOSettingUnsigned PolyphonyLimit;
GOSettingUnsigned Preset;
GOSettingUnsigned ReleaseLength;
GOSettingString LanguageCode;

class GOSettingUnsignedBit : public GOSettingUnsigned {
Expand Down
Loading