@@ -649,28 +649,28 @@ bool QgsLayoutItem::writePropertiesToElement( QDomElement &element, QDomDocument
649
649
element.setAttribute ( QStringLiteral ( " size" ), mItemSize .encodeSize () );
650
650
element.setAttribute ( QStringLiteral ( " rotation" ), QString::number ( rotation () ) );
651
651
652
- // TODO
653
- /*
654
- composerItemElem.setAttribute( "zValue", QString::number( zValue() ) );
655
- composerItemElem.setAttribute( "visibility", isVisible() );
652
+ element.setAttribute ( " zValue" , QString::number ( zValue () ) );
653
+ element.setAttribute ( " visibility" , isVisible () );
656
654
// position lock for mouse moves/resizes
657
- if ( mItemPositionLocked )
655
+ if ( mIsLocked )
658
656
{
659
- composerItemElem .setAttribute( "positionLock", "true" );
657
+ element .setAttribute ( " positionLock" , " true" );
660
658
}
661
659
else
662
660
{
663
- composerItemElem .setAttribute( "positionLock", "false" );
661
+ element .setAttribute ( " positionLock" , " false" );
664
662
}
665
- */
666
663
664
+ // TODO
665
+ #if 0
667
666
//blend mode
668
667
// composerItemElem.setAttribute( "blendMode", QgsMapRenderer::getBlendModeEnum( mBlendMode ) );
669
668
670
669
//transparency
671
670
// composerItemElem.setAttribute( "transparency", QString::number( mTransparency ) );
672
671
673
672
// composerItemElem.setAttribute( "excludeFromExports", mExcludeFromExports );
673
+ #endif
674
674
675
675
writeObjectPropertiesToElement ( element, document, context );
676
676
return true ;
@@ -691,26 +691,30 @@ bool QgsLayoutItem::readPropertiesFromElement( const QDomElement &element, const
691
691
/*
692
692
// temporary for groups imported from templates
693
693
mTemplateUuid = itemElem.attribute( "templateUuid" );
694
+ */
695
+
694
696
// position lock for mouse moves/resizes
695
- QString positionLock = itemElem .attribute( "positionLock" );
697
+ QString positionLock = element .attribute ( " positionLock" );
696
698
if ( positionLock.compare ( " true" , Qt::CaseInsensitive ) == 0 )
697
699
{
698
- setPositionLock ( true );
700
+ setLocked ( true );
699
701
}
700
702
else
701
703
{
702
- setPositionLock ( false );
704
+ setLocked ( false );
703
705
}
704
706
// visibility
705
- setVisibility( itemElem.attribute( "visibility", "1" ) != "0" );
706
- setZValue( itemElem.attribute( "zValue" ).toDouble() );
707
+ setVisible ( element.attribute ( " visibility" , " 1" ) != " 0" );
708
+ setZValue ( element.attribute ( " zValue" ).toDouble () );
709
+ #if 0 //TODO
707
710
//blend mode
708
- setBlendMode( QgsMapRenderer::getCompositionMode(( QgsMapRenderer::BlendMode ) itemElem.attribute( "blendMode", "0" ).toUInt() ) );
711
+ setBlendMode( QgsMapRenderer::getCompositionMode( ( QgsMapRenderer::BlendMode ) itemElem.attribute( "blendMode", "0" ).toUInt() ) );
709
712
//transparency
710
713
setTransparency( itemElem.attribute( "transparency", "0" ).toInt() );
711
714
mExcludeFromExports = itemElem.attribute( "excludeFromExports", "0" ).toInt();
712
715
mEvaluatedExcludeFromExports = mExcludeFromExports;
713
- */
716
+ #endif
717
+
714
718
return true ;
715
719
}
716
720
0 commit comments