File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -364,12 +364,6 @@ bool EngravingItem::collectForDrawing() const
364364 return false ;
365365 }
366366
367- bool isAnnotation = parent () && parent ()->isSegment () && toSegment (parent ())->element (track ()) != this ;
368- if (isAnnotation) {
369- Segment* segment = toSegment (parent ());
370- return systemFlag () || (segment->measure () && segment->measure ()->visible (staffIdx ()));
371- }
372-
373367 return true ;
374368}
375369
Original file line number Diff line number Diff line change @@ -679,19 +679,6 @@ NoteCaseType Harmony::bassRenderCase() const
679679 return noteCase;
680680}
681681
682- bool Harmony::collectForDrawing () const
683- {
684- if (!visible () && !score ()->isShowInvisible ()) {
685- return false ;
686- }
687-
688- if (Segment* parentSeg = getParentSeg ()) {
689- return systemFlag () || (parentSeg->measure () && parentSeg->measure ()->visible (staffIdx ()));
690- }
691-
692- return true ;
693- }
694-
695682// ---------------------------------------------------------
696683// startEdit
697684// ---------------------------------------------------------
Original file line number Diff line number Diff line change @@ -314,8 +314,6 @@ class Harmony final : public TextBase
314314 void setFamily (const String& val) override { m_fontFamily = val; }
315315 void setSize (const double & val) override { m_fontSize = val; }
316316
317- bool collectForDrawing () const override ;
318-
319317 struct LayoutData : public TextBase ::LayoutData {
320318 ld_field<double > harmonyHeight = { " [Harmony] harmonyHeight" , 0.0 }; // used for calculating the height is frame while editing.
321319 ld_field<std::vector<LineF> > polychordDividerLines = { " [Harmony] polychordDividerLine" , std::vector<LineF>() };
Original file line number Diff line number Diff line change @@ -1489,6 +1489,9 @@ void Segment::scanElements(std::function<void(EngravingItem*)> func)
14891489 e->scanElements (func);
14901490 }
14911491 for (EngravingItem* e : annotations ()) {
1492+ if (!e->systemFlag () && (!measure () || !measure ()->visible (e->staffIdx ()))) {
1493+ continue ;
1494+ }
14921495 e->scanElements (func);
14931496 }
14941497}
You can’t perform that action at this time.
0 commit comments