Mercurial > hg > svapp
comparison framework/SVFileReader.cpp @ 686:610fa108fbcc by-id
Update for changes to PlayParameters
author | Chris Cannam |
---|---|
date | Thu, 04 Jul 2019 18:04:59 +0100 |
parents | 7540733f5480 |
children | e0b0f3e163ca |
comparison
equal
deleted
inserted
replaced
685:7540733f5480 | 686:610fa108fbcc |
---|---|
59 m_location(location), | 59 m_location(location), |
60 m_currentPane(nullptr), | 60 m_currentPane(nullptr), |
61 m_currentDataset(XmlExportable::NO_ID), | 61 m_currentDataset(XmlExportable::NO_ID), |
62 m_currentLayer(nullptr), | 62 m_currentLayer(nullptr), |
63 m_pendingDerivedModel(XmlExportable::NO_ID), | 63 m_pendingDerivedModel(XmlExportable::NO_ID), |
64 m_currentPlayParameters(nullptr), | |
65 m_currentTransformChannel(0), | 64 m_currentTransformChannel(0), |
66 m_currentTransformIsNewStyle(true), | 65 m_currentTransformIsNewStyle(true), |
67 m_datasetSeparator(" "), | 66 m_datasetSeparator(" "), |
68 m_inRow(false), | 67 m_inRow(false), |
69 m_inLayer(false), | 68 m_inLayer(false), |
356 } else if (name == "view") { | 355 } else if (name == "view") { |
357 m_inView = false; | 356 m_inView = false; |
358 } else if (name == "selections") { | 357 } else if (name == "selections") { |
359 m_inSelections = false; | 358 m_inSelections = false; |
360 } else if (name == "playparameters") { | 359 } else if (name == "playparameters") { |
361 m_currentPlayParameters = nullptr; | 360 m_currentPlayParameters = {}; |
362 } | 361 } |
363 | 362 |
364 return true; | 363 return true; |
365 } | 364 } |
366 | 365 |
1371 } | 1370 } |
1372 | 1371 |
1373 bool | 1372 bool |
1374 SVFileReader::readPlayParameters(const QXmlAttributes &attributes) | 1373 SVFileReader::readPlayParameters(const QXmlAttributes &attributes) |
1375 { | 1374 { |
1376 m_currentPlayParameters = nullptr; | 1375 m_currentPlayParameters = {}; |
1377 | 1376 |
1378 int modelExportId = 0; | 1377 int modelExportId = 0; |
1379 bool modelOk = false; | 1378 bool modelOk = false; |
1380 modelExportId = attributes.value("model").trimmed().toInt(&modelOk); | 1379 modelExportId = attributes.value("model").trimmed().toInt(&modelOk); |
1381 | 1380 |
1386 | 1385 |
1387 if (haveModel(modelExportId)) { | 1386 if (haveModel(modelExportId)) { |
1388 | 1387 |
1389 bool ok = false; | 1388 bool ok = false; |
1390 | 1389 |
1391 PlayParameters *parameters = PlayParameterRepository::getInstance()-> | 1390 auto parameters = PlayParameterRepository::getInstance()-> |
1392 getPlayParameters(m_models[modelExportId].untyped); | 1391 getPlayParameters(m_models[modelExportId].untyped); |
1393 | 1392 |
1394 if (!parameters) { | 1393 if (!parameters) { |
1395 SVCERR << "WARNING: SV-XML: Play parameters for model " | 1394 SVCERR << "WARNING: SV-XML: Play parameters for model " |
1396 << modelExportId | 1395 << modelExportId |