Skip to content

Commit

Permalink
fix #25650
Browse files Browse the repository at this point in the history
  • Loading branch information
wschweer committed May 6, 2014
1 parent 7bc254f commit c20b96e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion libmscore/line.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class SLine : public Spanner {
void setDiagonal(bool v) { _diagonal = v; }

Spatium lineWidth() const { return _lineWidth; }
QColor lineColor() const { return (_lineColor == Qt::black)? curColor() : _lineColor; }
QColor lineColor() const { return _lineColor; }
Qt::PenStyle lineStyle() const { return _lineStyle; }
void setLineWidth(const Spatium& v) { _lineWidth = v; }
void setLineColor(const QColor& v) { _lineColor = v; }
Expand Down
10 changes: 6 additions & 4 deletions libmscore/text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -852,11 +852,13 @@ void Text::draw(QPainter* p) const
}
}
p->setBrush(Qt::NoBrush);
QColor color(textStyle().foregroundColor());
if (!visible())
color = Qt::gray;
else if (selected())
QColor color;
if (selected())
color = MScore::selectColor[0];
else if (!visible())
color = Qt::gray;
else
color = textStyle().foregroundColor();
p->setPen(color);
if (_editMode && _cursor.hasSelection()) {
int r1 = _cursor.selectLine();
Expand Down
7 changes: 4 additions & 3 deletions libmscore/textline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ void TextLineSegment::draw(QPainter* painter) const
bool normalColor = false;
if (selected() && !(score() && score()->printing()))
color = MScore::selectColor[0];
else if (!visible())
else if (!tl->visible())
color = Qt::gray;
else {
color = textLine()->curColor();
color = tl->curColor();
normalColor = true;
}
qreal l = 0.0;
Expand All @@ -97,7 +97,7 @@ void TextLineSegment::draw(QPainter* painter) const
l = _text->pos().x() + bb.width() + textlineTextDistance;
}
painter->translate(_text->pos());
painter->setPen(normalColor ? _text->curColor() : color);
_text->setVisible(tl->visible());
_text->draw(painter);
painter->translate(-_text->pos());
}
Expand Down Expand Up @@ -625,6 +625,7 @@ void TextLine::writeProperties(Xml& xml) const
//---------------------------------------------------------
// resolveSymCompatibility
//---------------------------------------------------------

static QString resolveSymCompatibility(SymId i, QString programVersion)
{
if (!programVersion.isEmpty() && programVersion < "1.1")
Expand Down

0 comments on commit c20b96e

Please sign in to comment.