Skip to content
Permalink
Browse files

Don't forget to load/save background and selection colors

  • Loading branch information
wonder-sk committed Aug 25, 2018
1 parent d9f67f8 commit f0dcf7ff1cfed8b3dec5fa2f0d285fd5e82d01ae
Showing with 12 additions and 0 deletions.
  1. +12 −0 src/3d/qgs3dmapsettings.cpp
@@ -63,6 +63,13 @@ void Qgs3DMapSettings::readXml( const QDomElement &elem, const QgsReadWriteConte
elemOrigin.attribute( "y" ).toDouble(),
elemOrigin.attribute( "z" ).toDouble() );

QDomElement elemColor = elem.firstChildElement( "color" );
if ( !elemColor.isNull() )
{
mBackgroundColor = QgsSymbolLayerUtils::decodeColor( elemColor.attribute( "background" ) );
mSelectionColor = QgsSymbolLayerUtils::decodeColor( elemColor.attribute( "selection" ) );
}

QDomElement elemCrs = elem.firstChildElement( "crs" );
mCrs.readXml( elemCrs );

@@ -147,6 +154,11 @@ QDomElement Qgs3DMapSettings::writeXml( QDomDocument &doc, const QgsReadWriteCon
elemOrigin.setAttribute( "z", QString::number( mOrigin.z() ) );
elem.appendChild( elemOrigin );

QDomElement elemColor = doc.createElement( "color" );
elemColor.setAttribute( "background", QgsSymbolLayerUtils::encodeColor( mBackgroundColor ) );
elemColor.setAttribute( "selection", QgsSymbolLayerUtils::encodeColor( mSelectionColor ) );
elem.appendChild( elemColor );

QDomElement elemCrs = doc.createElement( "crs" );
mCrs.writeXml( elemCrs, doc );
elem.appendChild( elemCrs );

0 comments on commit f0dcf7f

Please sign in to comment.
You can’t perform that action at this time.