Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/engraving/dom/engravingitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,12 +364,6 @@ bool EngravingItem::collectForDrawing() const
return false;
}

bool isAnnotation = parent() && parent()->isSegment() && toSegment(parent())->element(track()) != this;
if (isAnnotation) {
Segment* segment = toSegment(parent());
return systemFlag() || (segment->measure() && segment->measure()->visible(staffIdx()));
}

return true;
}

Expand Down
13 changes: 0 additions & 13 deletions src/engraving/dom/harmony.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -679,19 +679,6 @@ NoteCaseType Harmony::bassRenderCase() const
return noteCase;
}

bool Harmony::collectForDrawing() const
{
if (!visible() && !score()->isShowInvisible()) {
return false;
}

if (Segment* parentSeg = getParentSeg()) {
return systemFlag() || (parentSeg->measure() && parentSeg->measure()->visible(staffIdx()));
}

return true;
}

//---------------------------------------------------------
// startEdit
//---------------------------------------------------------
Expand Down
2 changes: 0 additions & 2 deletions src/engraving/dom/harmony.h
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,6 @@ class Harmony final : public TextBase
void setFamily(const String& val) override { m_fontFamily = val; }
void setSize(const double& val) override { m_fontSize = val; }

bool collectForDrawing() const override;

struct LayoutData : public TextBase::LayoutData {
ld_field<double> harmonyHeight = { "[Harmony] harmonyHeight", 0.0 }; // used for calculating the height is frame while editing.
ld_field<std::vector<LineF> > polychordDividerLines = { "[Harmony] polychordDividerLine", std::vector<LineF>() };
Expand Down
3 changes: 3 additions & 0 deletions src/engraving/dom/segment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1489,6 +1489,9 @@ void Segment::scanElements(std::function<void(EngravingItem*)> func)
e->scanElements(func);
}
for (EngravingItem* e : annotations()) {
if (!e->systemFlag() && (!measure() || !measure()->visible(e->staffIdx()))) {
continue;
}
e->scanElements(func);
}
}
Expand Down
Loading