From 4ac09e24f3e03497ba17b8d1cf2979096683e990 Mon Sep 17 00:00:00 2001 From: larspalo Date: Thu, 11 Jul 2024 22:07:13 +0200 Subject: [PATCH] Fixed bug/issue affecting the msw port in PipeDialog causing navigation with Next button to set percussive as yes. --- CHANGELOG.md | 1 + src/PipeDialog.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81e25cb..77490bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Bug that caused a read label placement at the last column to be invalid. - Crash happening on windows port if organ tree had wrong focus when opening an .organ file. - Copy pipe offset feature to also set HasIndependentRelease value from source pipe to target(s). +- Issue/Bug on the msw port in the PipeDialog that would cause forcing selection of IsPercussive=Y when navigating with "Next" button to the last pipe ## [0.14.0] - 2024-07-02 diff --git a/src/PipeDialog.cpp b/src/PipeDialog.cpp index 182fe13..6a28fb7 100644 --- a/src/PipeDialog.cpp +++ b/src/PipeDialog.cpp @@ -624,12 +624,16 @@ Pipe* PipeDialog::GetPipePointer(unsigned index) { void PipeDialog::SetButtonState() { if (m_selectedPipeIndex == 0) { + if (m_prevPipeBtn->HasFocus()) + m_nextPipeBtn->SetFocus(); m_prevPipeBtn->Disable(); } else if (m_selectedPipeIndex > 0) { m_prevPipeBtn->Enable(); } if (m_selectedPipeIndex == (m_rank_pipelist.size() - 1)) { + if (m_nextPipeBtn->HasFocus()) + m_prevPipeBtn->SetFocus(); m_nextPipeBtn->Disable(); } else if (m_selectedPipeIndex < (m_rank_pipelist.size() - 1)) { m_nextPipeBtn->Enable(); @@ -645,11 +649,9 @@ void PipeDialog::TransferPipeValuesToWindow() { } if (m_currentPipe->isPercussive) { m_isPercussiveYes->SetValue(true); - // m_isPercussiveNo->SetValue(false); m_hasIndependentReleaseYes->Enable(); m_hasIndependentReleaseNo->Enable(); } else { - // m_isPercussiveYes->SetValue(false); m_isPercussiveNo->SetValue(true); m_hasIndependentReleaseYes->Enable(false); m_hasIndependentReleaseNo->Enable(false);