Commit e805a2d8 authored by Benjamin Jakimow's avatar Benjamin Jakimow
Browse files

mapvisualization.py: tries to save layer tree


Signed-off-by: Benjamin Jakimow's avatarBenjamin Jakimow benjamin.jakimow@geo.hu-berlin.de <benjamin.jakimow@geo.hu-berlin.de>
parent d6db1b30
......@@ -289,6 +289,10 @@ class MapView(QFrame):
textFormat = mapView.mapTextFormat()
textFormat.readXml(nodeMapView, context)
lyrTreeNode = node.firstChildElement('MapViewLayerTree').toElement()
mapView.mLayerTree.readXml(lyrTreeNode, context)
lyrNode = node.firstChildElement('MapViewProxyLayer').toElement()
while lyrNode.nodeName() == 'MapViewProxyLayer':
sid = lyrNode.attribute('sensor_id')
......@@ -315,6 +319,9 @@ class MapView(QFrame):
nodeTextStyle = self.mapTextFormat().writeXml(doc, context)
nodeMapView.appendChild(nodeTextStyle)
nodeLayerTree = doc.createElement('MapViewLayerTree')
self.mLayerTree.writeXml(nodeLayerTree, context)
for sensor in self.sensors():
lyr = self.sensorProxyLayer(sensor)
if isinstance(lyr, SensorProxyLayer):
......
......@@ -66,8 +66,8 @@ class TestMain(EOTSVTestCase):
# save and read settings
path = self.createTestOutputDirectory() / 'test.qgz'
QgsProject.instance().write(path.as_posix())
#self.assertTrue(QgsProject.instance().read(path.as_posix()))
#TSV.onReloadProject()
self.assertTrue(QgsProject.instance().read(path.as_posix()))
TSV.onReloadProject()
self.showGui([TSV.ui])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment