From cb65146fd5cd2e94b4de8d3fef44ea12c1554ecf Mon Sep 17 00:00:00 2001 From: ws Date: Wed, 27 Apr 2016 18:02:42 +0200 Subject: [PATCH] fix #108171: Barline properties in inspector dont work --- libmscore/barline.cpp | 4 ++-- libmscore/mscore.cpp | 2 -- mscore/inspector/inspectorBase.cpp | 3 +++ 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/libmscore/barline.cpp b/libmscore/barline.cpp index dad8762cc370..b611720ca5bd 100644 --- a/libmscore/barline.cpp +++ b/libmscore/barline.cpp @@ -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; @@ -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; diff --git a/libmscore/mscore.cpp b/libmscore/mscore.cpp index 1434b5fe1b18..db8c15da3ad9 100644 --- a/libmscore/mscore.cpp +++ b/libmscore/mscore.cpp @@ -171,7 +171,6 @@ void MScore::init() qRegisterMetaType ("ElementType"); qRegisterMetaType ("ValueType"); -// qRegisterMetaType("Direction"); qRegisterMetaType("Direction"); qRegisterMetaType("DirectionH"); @@ -373,7 +372,6 @@ QQmlEngine* MScore::qml() qmlRegisterType ("MuseScore", 1, 0, "QProcess"); qmlRegisterType ("FileIO", 1, 0, "FileIO"); //-----------mscore bindings -// qmlRegisterUncreatableType("MuseScore", 1, 0, "Direction", tr("You can't create an enumeration")); qmlRegisterUncreatableType("MuseScore", 1, 0, "Direction", tr("You can't create an enumeration")); qmlRegisterType ("MuseScore", 1, 0, "MScore"); diff --git a/mscore/inspector/inspectorBase.cpp b/mscore/inspector/inspectorBase.cpp index 0963919661bf..c05a510f1f2a 100644 --- a/mscore/inspector/inspectorBase.cpp +++ b/mscore/inspector/inspectorBase.cpp @@ -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; }