Added unit-independent distance type.

This commit is contained in:
Jim Evins
2016-03-13 21:03:09 -04:00
parent 573369b6da
commit a6aa0d921f
74 changed files with 1452 additions and 996 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
/* XmlTemplateCreator.cpp
*
* Copyright (C) 2013 Jim Evins <evins@snaught.com>
* Copyright (C) 2013-2016 Jim Evins <evins@snaught.com>
*
* This file is part of gLabels-qt.
*
@@ -203,11 +203,11 @@ namespace libglabels
XmlUtil::setLengthAttr( node, "radius", frame->r1() );
XmlUtil::setLengthAttr( node, "hole", frame->r2() );
XmlUtil::setLengthAttr( node, "waste", frame->waste() );
if ( frame->w() )
if ( frame->w() != Distance(0) )
{
XmlUtil::setLengthAttr( node, "width", frame->w() );
}
if ( frame->h() )
if ( frame->h() != Distance(0) )
{
XmlUtil::setLengthAttr( node, "height", frame->h() );
}