Repository navigation
[4.7.5] Fix incorrect masking behind pitch name noteheads when they revert to default - #34244
Jojo-Schmitz wants to merge 2195 commits into
Conversation
as long as it is multi-line text
RemoveNoteParenthesisInfo and RemoveElement were both being used and taking ownership of the Parenthesis object leading to 2 deletes on closing the score
…mation Automation - fix assertion when opening empty score page
Port 4.7.4 engraving PRs to main
…onts Fix finding external Musical Text Fonts and their metadata.json files
…data-parameter Remove `EditData` parameter from undo/redo methods
- fixes shared libraries search paths on linux - fixes local debug builds on windows - improves warnings handling
Update muse_deps
Allow framed texts' frames to not demand width greater than (or equal to) height
includes: musescore/muse_deps#25
Update muse_deps
…dth as a property instead of casting the StyledTabButton tabBar.
…e PropertiesPanelTabBar. Protect truncatedItemWidth computation against negative values.
…to tend towards grace-before by default
…wing and steal-time-previous attributes (if present)
Automation: fix curve rendering, interaction, and sync issues
Implement page locks
…ing added in Spanner::add
…rty using getProperty and setProperty instead of getting it through visible() (to ensure that they both go through property delegates, if any)
Fix musicXML imports containing start-end repeat barlines from Noteflight
MusicXML import: tighten the assumption of grace-after notes based on slurs
Fix spanners' `visible` property propagation to new segments in Spanner::add()
Add notehead schemes for pitch names without alterations
5954519 to
1f8a0d6
Compare
1f8a0d6 to
08d04d7
Compare
📝 WalkthroughWalkthroughExtended 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsLinked repositories: Public OSS repositories can only analyze public repositories installed in this organization. No linked repositories were analyzed; skipped Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/engraving/dom/note.cpp (1)
468-499: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider using a
switchstatement for TPC mapping.The
if-else ifchain for mapping TPCs to notehead groups has grown quite large. Converting the entire block (lines 351-500) into aswitch (tpc)statement would improve readability and slightly improve execution performance.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/engraving/dom/note.cpp` around lines 468 - 499, Convert the complete TPC-to-notehead-group mapping block in the surrounding notehead-group selection function into a switch statement on tpc. Add cases for each existing Tpc value, preserve the german-specific B/B-sharp handling and all current group assignments, and retain the existing fallback behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/engraving/dom/note.cpp`:
- Around line 488-489: Update the TPC_B_BB and TPC_B_BBB branch in the note-head
grouping logic to assign NoteHeadGroup::HEAD_H instead of HEAD_B, matching the
German notation fallback used for TPC_B_SS.
---
Nitpick comments:
In `@src/engraving/dom/note.cpp`:
- Around line 468-499: Convert the complete TPC-to-notehead-group mapping block
in the surrounding notehead-group selection function into a switch statement on
tpc. Add cases for each existing Tpc value, preserve the german-specific
B/B-sharp handling and all current group assignments, and retain the existing
fallback behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: d47a9daf-3cbf-4cfb-921a-3013070c5fe9
📥 Commits
Reviewing files that changed from the base of the PR and between 4d3e04e and 1f8a0d62bb2bffdea9972da2fa59830672469224.
📒 Files selected for processing (1)
src/engraving/dom/note.cpp
| } else if (tpc == Tpc::TPC_B_BB || tpc == Tpc::TPC_B_BBB) { | ||
| group = NoteHeadGroup::HEAD_B; |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Handle German notation for B double/triple flats.
In German notation, B double flat is "Heses", which derives from the base note "H" (B natural). When stripping accidentals for these unsupported TPCs, the group should fall back to HEAD_H instead of HEAD_B. The current code maps to HEAD_B unconditionally, which is inconsistent with the handling of TPC_B_SS on lines 470-475.
🐛 Proposed fix
- } else if (tpc == Tpc::TPC_B_BB || tpc == Tpc::TPC_B_BBB) {
- group = NoteHeadGroup::HEAD_B;
+ } else if (tpc == Tpc::TPC_B_BB || tpc == Tpc::TPC_B_BBB) {
+ if (german) {
+ group = NoteHeadGroup::HEAD_H;
+ } else {
+ group = NoteHeadGroup::HEAD_B;
+ }📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| } else if (tpc == Tpc::TPC_B_BB || tpc == Tpc::TPC_B_BBB) { | |
| group = NoteHeadGroup::HEAD_B; | |
| } else if (tpc == Tpc::TPC_B_BB || tpc == Tpc::TPC_B_BBB) { | |
| if (german) { | |
| group = NoteHeadGroup::HEAD_H; | |
| } else { | |
| group = NoteHeadGroup::HEAD_B; | |
| } |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/engraving/dom/note.cpp` around lines 488 - 489, Update the TPC_B_BB and
TPC_B_BBB branch in the note-head grouping logic to assign NoteHeadGroup::HEAD_H
instead of HEAD_B, matching the German notation fallback used for TPC_B_SS.
Resolves: #34229
Backport of #34242