enhance import of pre 3.x files

This commit is contained in:
Werner Schweer 2017-10-13 12:12:11 +02:00
parent 5102085280
commit 531d1ed2fa
5 changed files with 7 additions and 17 deletions

View file

@ -3495,7 +3495,7 @@ void Score::doLayoutRange(int stick, int etick)
pages().clear();
return;
}
qDebug("%p %d-%d %s systems %d", this, stick, etick, isMaster() ? "Master" : "Part", int(_systems.size()));
// qDebug("%p %d-%d %s systems %d", this, stick, etick, isMaster() ? "Master" : "Part", int(_systems.size()));
bool layoutAll = stick <= 0 && (etick < 0 || etick >= last()->endTick());
if (stick < 0)
stick = 0;

View file

@ -307,7 +307,7 @@ void readPageFormat(MStyle* style, XmlReader& e)
// readTextStyle
//---------------------------------------------------------
static void readTextStyle(MStyle* style, XmlReader& e)
void readTextStyle206(MStyle* style, XmlReader& e)
{
Spatium frameWidth(0.0);
QString name = e.attribute("name");
@ -2015,7 +2015,7 @@ static void readStyle(MStyle* style, XmlReader& e)
QString tag = e.name().toString();
if (tag == "TextStyle")
readTextStyle(style, e);
readTextStyle206(style, e);
else if (tag == "Spatium")
style->set(StyleIdx::spatium, e.readDouble() * DPMM);
else if (tag == "page-layout")
@ -2382,7 +2382,7 @@ void PageFormat::read(XmlReader& e)
Score::FileError MasterScore::read206(XmlReader& e)
{
qDebug("read206");
// qDebug("read206");
for (unsigned int i = 0; i < sizeof(style206)/sizeof(*style206); ++i)
style().set(style206[i].idx, style206[i].val);

View file

@ -68,6 +68,7 @@ class PageFormat {
extern void readArticulation(Articulation*, XmlReader&);
extern void setPageFormat(MStyle*, const PageFormat&);
extern void initPageFormat(MStyle*, PageFormat*);
extern void readTextStyle206(MStyle* style, XmlReader& e);
}
#endif

View file

@ -24,6 +24,7 @@
#include "layout.h"
#include "property.h"
#include "elementlayout.h"
#include "read206.h"
namespace Ms {
@ -1502,10 +1503,7 @@ void MStyle::load(XmlReader& e)
const QStringRef& tag(e.name());
if (tag == "TextStyle") {
e.skipCurrentElement();
// TextStyle s;
//s.read(e);
// setTextStyle(s);
readTextStyle206(this, e); // obsolete
}
else if (tag == "Spatium")
set(StyleIdx::spatium, e.readDouble() * DPMM);

View file

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<museScore version="3.00">
<programVersion>3.0.0</programVersion>
<programRevision>3543170</programRevision>
<Score>
<LayerTag id="0" tag="default"></LayerTag>
<currentLayer>0</currentLayer>
@ -30,9 +29,7 @@
<beamDistance>0.33</beamDistance>
<lastSystemFillLimit>0.25</lastSystemFillLimit>
<hairpinWidth>0.2</hairpinWidth>
<pedalY>0</pedalY>
<pedalLineWidth>0.2</pedalLineWidth>
<trillY>0</trillY>
<showMeasureNumber>0</showMeasureNumber>
<chordStyle>jazz</chordStyle>
<chordDescriptionFile>chords_jazz.xml</chordDescriptionFile>
@ -477,12 +474,6 @@
<metaTag name="translator"></metaTag>
<metaTag name="workNumber"></metaTag>
<metaTag name="workTitle"></metaTag>
<PageList>
<Page>
<System>
</System>
</Page>
</PageList>
<Part>
<Staff id="1">
<StaffType group="pitched">