# HG changeset patch # User Matti Hamalainen # Date 1499684164 -10800 # Node ID 6e2d26e7a0b487b5eeb49e9754fd3dc54750c3a8 # Parent a063cb8a171b1cc3f48b75f4a48319c902d1b409 Add few helpers. diff -r a063cb8a171b -r 6e2d26e7a0b4 src/main.cpp --- a/src/main.cpp Mon Jul 10 12:52:35 2017 +0300 +++ b/src/main.cpp Mon Jul 10 13:56:04 2017 +0300 @@ -672,8 +672,7 @@ // Check for end of page // KLUDGE for now - if (getPageInfo && - ctx.m_pos.y() + (ctx.boundRect().height() * 4) >= 1300.0f / 2.0f) + if (getPageInfo && ctx.lfq(10) >= 1300.0f) { if (nline > pinfo.nlinesPerPage) pinfo.nlinesPerPage = nline; diff -r a063cb8a171b -r 6e2d26e7a0b4 src/main.h --- a/src/main.h Mon Jul 10 12:52:35 2017 +0300 +++ b/src/main.h Mon Jul 10 13:56:04 2017 +0300 @@ -316,11 +316,21 @@ m_pos.setY(m_pos.y() + boundRect().height() + yadd); } + qreal lfq(qreal yadd) + { + return m_pos.y() + boundRect().height() + yadd; + } + void lf() { lf(m_lf_add); } + qreal lfq() + { + return m_pos.y() + boundRect().height() + m_lf_add; + } + void setPos(const QPointF &pos) { m_pos = pos;