Skip to content

Conversation

mike-spa
Copy link
Contributor

@mike-spa mike-spa commented Sep 9, 2025

Resolves: #29716
Resolves: #29009

@mike-spa mike-spa requested a review from avvvvve September 9, 2025 08:43
@mike-spa mike-spa force-pushed the moreFretDiagramImprovements branch 3 times, most recently from 07498b9 to c24167a Compare September 10, 2025 09:01
void FretLinkHarmony::undo(EditData*)
{
if (m_unlink) {
m_fretDiagram->linkHarmony(m_harmony);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function sets the harmony's z value and applies some alignment changes. I think we still need to do these things when adding and removing harmony from fret diagrams.

if (m_unlink) {
m_fretDiagram->linkHarmony(m_harmony);
} else {
m_fretDiagram->unlinkHarmony();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise here

public:
FretLinkHarmony(FretDiagram*, Harmony*, bool unlink = false);

UNDO_TYPE(CommandType::FretLinkHarmony)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This enum value can be removed now

@mike-spa mike-spa force-pushed the moreFretDiagramImprovements branch from f395c0c to aa95bd4 Compare September 10, 2025 13:23
…plify code

We can use Score::undoChangeParent instead of FretLinkHarmony
Simplify z-level management
Remove unused unlinkHarmony
Remove unused resetHarmonyAlignment
Remove unused linkHarmony
Remove unused applyAlignmentToHarmony
Remove unused CommandType::FretLinkHarmony
@mike-spa mike-spa force-pushed the moreFretDiagramImprovements branch from aa95bd4 to c37a121 Compare September 10, 2025 14:45
@miiizen miiizen merged commit bc1f397 into musescore:master Sep 10, 2025
12 of 13 checks passed
mike-spa added a commit to mike-spa/MuseScore that referenced this pull request Sep 12, 2025
@mike-spa mike-spa mentioned this pull request Sep 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issues with doubling and layout changes after adding Fretboard diagrams to chord symbols in Part Change reset button behaviors for FDL
3 participants