Skip to content

Commit 58d25ef

Browse files
committed
[composer] Don't default to showing grid when opening 2.0 projects
1 parent befe56f commit 58d25ef

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

src/core/composer/qgscomposition.cpp

+3-16
Original file line numberDiff line numberDiff line change
@@ -603,22 +603,9 @@ bool QgsComposition::readXML( const QDomElement& compositionElem, const QDomDocu
603603
}
604604

605605
//snapping
606-
if ( compositionElem.attribute( "snapping" ) == "0" )
607-
{
608-
mSnapToGrid = false;
609-
}
610-
else
611-
{
612-
mSnapToGrid = true;
613-
}
614-
if ( compositionElem.attribute( "gridVisible" ) == "0" )
615-
{
616-
mGridVisible = false;
617-
}
618-
else
619-
{
620-
mGridVisible = true;
621-
}
606+
mSnapToGrid = compositionElem.attribute( "snapping", "0" ).toInt() == 0 ? false : true;
607+
mGridVisible = compositionElem.attribute( "gridVisible", "0" ).toInt() == 0 ? false : true;
608+
622609
mSnapGridResolution = compositionElem.attribute( "snapGridResolution" ).toDouble();
623610
mSnapGridTolerance = compositionElem.attribute( "snapGridTolerance", "2.0" ).toDouble();
624611
mSnapGridOffsetX = compositionElem.attribute( "snapGridOffsetX" ).toDouble();

0 commit comments

Comments
 (0)