Skip to content

Commit

Permalink
fix #108171: Barline properties in inspector dont work
Browse files Browse the repository at this point in the history
  • Loading branch information
wschweer committed Apr 27, 2016
1 parent e6fed8a commit cb65146
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions libmscore/barline.cpp
Expand Up @@ -954,7 +954,7 @@ qreal BarLine::layoutWidth(Score* score, BarLineType type, qreal mag)
qreal dw = score->styleP(StyleIdx::barWidth) * mag;

qreal dotwidth = score->scoreFont()->width(SymId::repeatDot, mag);
switch(type) {
switch (type) {
case BarLineType::DOUBLE:
dw = (score->styleP(StyleIdx::doubleBarWidth) * 2
+ score->styleP(StyleIdx::doubleBarDistance)) * mag;
Expand All @@ -981,7 +981,7 @@ qreal BarLine::layoutWidth(Score* score, BarLineType type, qreal mag)
case BarLineType::DOTTED:
break;
default:
qDebug("illegal barline type");
qDebug("illegal barline type %d", int(type));
break;
}
return dw;
Expand Down
2 changes: 0 additions & 2 deletions libmscore/mscore.cpp
Expand Up @@ -171,7 +171,6 @@ void MScore::init()
qRegisterMetaType<Element::Type> ("ElementType");
qRegisterMetaType<Note::ValueType> ("ValueType");

// qRegisterMetaType<MSQE_Direction::E>("Direction");
qRegisterMetaType<Direction::E>("Direction");

qRegisterMetaType<MScore::DirectionH>("DirectionH");
Expand Down Expand Up @@ -373,7 +372,6 @@ QQmlEngine* MScore::qml()
qmlRegisterType<MsProcess> ("MuseScore", 1, 0, "QProcess");
qmlRegisterType<FileIO, 1> ("FileIO", 1, 0, "FileIO");
//-----------mscore bindings
// qmlRegisterUncreatableType<MSQE_Direction>("MuseScore", 1, 0, "Direction", tr("You can't create an enumeration"));
qmlRegisterUncreatableType<Direction>("MuseScore", 1, 0, "Direction", tr("You can't create an enumeration"));

qmlRegisterType<MScore> ("MuseScore", 1, 0, "MScore");
Expand Down
3 changes: 3 additions & 0 deletions mscore/inspector/inspectorBase.cpp
Expand Up @@ -83,6 +83,9 @@ QVariant InspectorBase::getValue(const InspectorItem& ii) const
case P_TYPE::SIZE_MM:
v = v.toDouble() * DPMM;
break;
case P_TYPE::BARLINE_TYPE:
v = QVariant::fromValue(BarLineType(v.toInt()));
break;
default:
break;
}
Expand Down

0 comments on commit cb65146

Please sign in to comment.