Skip to content

Commit

Permalink
skip associations for GRGrace
Browse files Browse the repository at this point in the history
  • Loading branch information
dfober committed Aug 2, 2023
1 parent 53a7837 commit 54d2ad3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/engine/graphic/GRGrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ class GRGrace : public GRARCompositeNotationElement,
virtual ~GRGrace() {}

virtual void tellPosition( GObject * caller,const NVPoint & inPos );
// virtual void addAssociation( GRNotationElement * p );
// DF-02-08-2023 don't add associations to grace (useless)
// solves the crash bug in issue #173
virtual void addAssociation( GRNotationElement * p ) {}

virtual GuidoPos AddTail( GRNotationElement * el );
};
Expand Down
6 changes: 6 additions & 0 deletions src/engine/graphic/GRNotationElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "GRClef.h"
#include "GRKey.h"
#include "GRMeter.h"
#include "GRGrace.h"

// - Guido AR
#include "ARMusicalObject.h"
Expand Down Expand Up @@ -372,6 +373,11 @@ NVRect GRNotationElement::getAssociatedBoundingBox() const
// -------------------------------------------------------------------------
void GRNotationElement::addAssociation( GRNotationElement * p )
{
// DF 02-08-2023 don't associate a GRGrace to any element
// it's useless since notes are already notified of their 'grace' status
// solves the crash of issue #173
if (dynamic_cast<const GRGrace*>(p)) return;

if (mAssociated == 0)
mAssociated = new NEPointerList; // these elements don't belong to the list

Expand Down

0 comments on commit 54d2ad3

Please sign in to comment.