Skip to content

Commit

Permalink
Fix GH#22384: Don't align dynamics when hairpin line isn't visible
Browse files Browse the repository at this point in the history
Backport of musescore#22813

Plus some cleanup in the includes
  • Loading branch information
XiaoMigros authored and Jojo-Schmitz committed Apr 28, 2024
1 parent d089067 commit 6cc235a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions libmscore/hairpin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,19 @@
// the file LICENCE.GPL
//=============================================================================

#include "hairpin.h"
#include "changeMap.h"
#include "dynamichairpingroup.h"
#include "style.h"
#include "xml.h"
#include "utils.h"
#include "score.h"
#include "hairpin.h"
#include "measure.h"
#include "mscore.h"
#include "score.h"
#include "segment.h"
#include "staff.h"
#include "style.h"
#include "system.h"
#include "undo.h"
#include "staff.h"
#include "mscore.h"
#include "chord.h"
#include "changeMap.h"
#include "utils.h"
#include "xml.h"

namespace Ms {

Expand Down Expand Up @@ -304,7 +303,8 @@ void HairpinSegment::layout()
rypos() += yd;
}

if (hairpin()->addToSkyline() && !hairpin()->diagonal()) {
if (hairpin()->addToSkyline() && !hairpin()->lineVisible()
&& !hairpin()->diagonal()) {
// align dynamics with hairpin
if (sd && sd->autoplace() && sd->placement() == hairpin()->placement()) {
qreal ny = y() + ddiff - sd->offset().y();
Expand Down

0 comments on commit 6cc235a

Please sign in to comment.