File tree Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -2513,9 +2513,6 @@ Shape Beam::shape() const
2513
2513
// BEAM SEGMENT CLASS
2514
2514
// -------------------------------------------------------
2515
2515
2516
- BeamSegment::BeamSegment (Beam* b)
2517
- : EngravingItem(ElementType::BEAM_SEGMENT, b), beam(b) {}
2518
-
2519
2516
Shape BeamSegment::shape () const
2520
2517
{
2521
2518
Shape shape;
@@ -2531,7 +2528,7 @@ Shape BeamSegment::shape() const
2531
2528
if (RealIsEqual (startPoint.y (), endPoint.y ())) {
2532
2529
RectF rect (startPoint.x (), startPoint.y (), beamHorizontalLength, _beamWidth / 2 );
2533
2530
rect.adjust (0.0 , -_beamWidth / 2 , 0.0 , 0.0 );
2534
- shape.add (rect, this );
2531
+ shape.add (rect, beam );
2535
2532
return shape;
2536
2533
}
2537
2534
// If not, break the beam shape into multiple rectangles
@@ -2548,7 +2545,7 @@ Shape BeamSegment::shape() const
2548
2545
for (PointF point : pointsOnBeamLine) {
2549
2546
RectF rect (point.x (), point.y (), horizontalStep, _beamWidth / 2 );
2550
2547
rect.adjust (0.0 , -_beamWidth / 2 , 0.0 , 0.0 );
2551
- shape.add (rect, this );
2548
+ shape.add (rect, beam );
2552
2549
}
2553
2550
return shape;
2554
2551
}
Original file line number Diff line number Diff line change @@ -39,8 +39,9 @@ enum class SpannerSegmentType;
39
39
40
40
struct BeamFragment ;
41
41
42
- class BeamSegment : public EngravingItem
42
+ class BeamSegment
43
43
{
44
+ OBJECT_ALLOCATOR (engraving, BeamSegment)
44
45
public:
45
46
mu::LineF line;
46
47
int level;
@@ -50,11 +51,11 @@ class BeamSegment : public EngravingItem
50
51
bool isBeamlet = false ;
51
52
bool isBefore = false ;
52
53
53
- Shape shape () const override ;
54
+ Shape shape () const ;
54
55
Beam* beam;
55
56
56
- BeamSegment (Beam* b);
57
- BeamSegment* clone () const override { return new BeamSegment (* this ); }
57
+ BeamSegment (Beam* b)
58
+ : beam(b) { }
58
59
};
59
60
60
61
// ---------------------------------------------------------
Original file line number Diff line number Diff line change @@ -5919,7 +5919,7 @@ void Score::createPaddingTable()
5919
5919
}
5920
5920
5921
5921
// This is needed for beamlets, not beams themselves
5922
- _paddingTable[ElementType::BEAM_SEGMENT ][ElementType::BEAM_SEGMENT ] = 0.4 * spatium ();
5922
+ _paddingTable[ElementType::BEAM ][ElementType::BEAM ] = 0.4 * spatium ();
5923
5923
}
5924
5924
5925
5925
// --------------------------------------------------------
You can’t perform that action at this time.
0 commit comments