Skip to content

Commit

Permalink
fix #276153 Select>more... by subtype does not work to select by text…
Browse files Browse the repository at this point in the history
… style
  • Loading branch information
wschweer committed Dec 17, 2018
1 parent 835c19d commit 7893373
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 10 deletions.
4 changes: 2 additions & 2 deletions libmscore/dynamic.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ class Dynamic final : public TextBase {
void setDynamicType(const QString&);
QString dynamicTypeName() const;
Type dynamicType() const { return _dynamicType; }
virtual int subtype() const { return (int) _dynamicType; }
virtual QString subtypeName() const { return dynamicTypeName(); }
virtual int subtype() const override { return (int) _dynamicType; }
virtual QString subtypeName() const override { return dynamicTypeName(); }

virtual void layout() override;
virtual void write(XmlWriter& xml) const override;
Expand Down
3 changes: 1 addition & 2 deletions libmscore/score.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3047,8 +3047,7 @@ void Score::collectMatch(void* data, Element* e)
else if (p->subtypeValid && p->subtype != e->subtype())
return;

if ((p->staffStart != -1)
&& ((p->staffStart > e->staffIdx()) || (p->staffEnd <= e->staffIdx())))
if ((p->staffStart != -1) && ((p->staffStart > e->staffIdx()) || (p->staffEnd <= e->staffIdx())))
return;

if (p->voice != -1 && p->voice != e->voice())
Expand Down
2 changes: 0 additions & 2 deletions libmscore/stafftextbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ class StaffTextBase : public TextBase {
virtual void write(XmlWriter& xml) const override;
virtual void read(XmlReader&) override;
virtual bool readProperties(XmlReader&) override;
virtual int subtype() const { return 0; } // TODO::ws
virtual QString subtypeName() const { return "??"; }

Segment* segment() const;
QString channelName(int voice) const { return _channelNames[voice]; }
Expand Down
2 changes: 1 addition & 1 deletion libmscore/textbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2149,7 +2149,7 @@ QString TextBase::screenReaderInfo() const

int TextBase::subtype() const
{
return int(Tid());
return int(tid());
}

//---------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions libmscore/textbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,8 @@ class TextBase : public Element {
virtual QString accessibleInfo() const override;
virtual QString screenReaderInfo() const override;

virtual int subtype() const;
virtual QString subtypeName() const;
virtual int subtype() const override;
virtual QString subtypeName() const override;

QList<TextFragment> fragmentList() const; // for MusicXML formatted export

Expand Down
2 changes: 1 addition & 1 deletion mscore/selectdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ SelectDialog::SelectDialog(const Element* _e, QWidget* parent)
void SelectDialog::setPattern(ElementPattern* p)
{
p->type = int(e->type());
p->subtype = int(e->subtype());
p->subtype = e->subtype();
if (e->isSlurSegment())
p->subtype = int(toSlurSegment(e)->spanner()->type());

Expand Down

0 comments on commit 7893373

Please sign in to comment.