Skip to content

Commit

Permalink
Fixed last switch removal from available switches for tremulants. Fix…
Browse files Browse the repository at this point in the history
…ed last rank removal from available ranks for stops.
  • Loading branch information
larspalo committed Jun 14, 2024
1 parent 0028784 commit 7eb8e86
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Bug that prevented removal of last switch from available switches for stops and couplers.
- Bug that prevented removal of last switch from list of available switches for stops, couplers and tremulants.
- Bug that prevented removal of last rank from list of available ranks for stops.

## [0.12.2] - 2024-05-22

Expand Down
3 changes: 3 additions & 0 deletions src/StopPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,9 @@ void StopPanel::setStop(Stop *stop) {

m_availableRanks->Clear();
m_availableRanks->InsertItems(organRanks, 0);
} else {
if (m_availableRanks->GetCount())
m_availableRanks->Clear();
}

UpdateReferencedRanks();
Expand Down
3 changes: 3 additions & 0 deletions src/TremulantPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,9 @@ void TremulantPanel::setTremulant(Tremulant *tremulant) {
}
m_availableSwitches->Clear();
m_availableSwitches->InsertItems(organSwitches, 0);
} else {
if (m_availableSwitches->GetCount())
m_availableSwitches->Clear();
}

UpdateReferencedSwitches();
Expand Down

0 comments on commit 7eb8e86

Please sign in to comment.