diff --git a/limereport/lritemscontainerdesignitf.cpp b/limereport/lritemscontainerdesignitf.cpp index 441e069..365e7e3 100644 --- a/limereport/lritemscontainerdesignitf.cpp +++ b/limereport/lritemscontainerdesignitf.cpp @@ -6,15 +6,13 @@ namespace LimeReport { bool Segment::intersect(Segment value) { - return ((value.m_end>=m_begin)&&(value.m_end<=m_end)) || - ((value.m_begin>=m_begin)&&(value.m_end>=m_end)) || - ((value.m_begin>=m_begin)&&(value.m_end<=m_end)) || - ((value.m_beginm_end)) ; + return (value.m_begin <= m_end) && (value.m_end >= m_begin); } qreal Segment::intersectValue(Segment value) { - if ((value.m_end>=m_begin)&&(value.m_end<=m_end)){ + if (!intersect(value)) return 0; + if ((value.m_end >= m_begin) && (value.m_end <= m_end)){ return value.m_end-m_begin; } if ((value.m_begin>=m_begin)&&(value.m_end>=m_end)){ diff --git a/limereport/lrpageitemdesignintf.cpp b/limereport/lrpageitemdesignintf.cpp index 6d010a5..f191a16 100644 --- a/limereport/lrpageitemdesignintf.cpp +++ b/limereport/lrpageitemdesignintf.cpp @@ -804,7 +804,6 @@ void PageItemDesignIntf::initPageSize(const PageItemDesignIntf::PageSize &size) m_sizeChainging = true; if (m_pageSize != Custom){ QSizeF pageSize = getRectByPageSize(size); - qDebug() << pageSize; setWidth(pageSize.width()); setHeight(pageSize.height()); }