diff --git a/ChangeLog.txt b/ChangeLog.txt index c4ea07ed9..b98a0c820 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -26,6 +26,7 @@ - New options to hide all/show all visibility groups. - New feature "Hide piece's main path". - Allow controlling priority selecting pieces in layout. +- No scissors on tiled PDF bottom row. # Version 0.6.2 (unreleased) - [#903] Bug in tool Cut Spline path. diff --git a/src/libs/vlayout/vposter.cpp b/src/libs/vlayout/vposter.cpp index 705d49667..b6bed50d4 100644 --- a/src/libs/vlayout/vposter.cpp +++ b/src/libs/vlayout/vposter.cpp @@ -80,6 +80,8 @@ QVector VPoster::Calc(const QRect &imageRect, int page, PageOrientat //--------------------------------------------------------------------------------------------------------------------- QVector VPoster::Borders(QGraphicsItem *parent, const PosterData &img, int sheets) const { + SCASSERT(parent != nullptr) + QVector data; QPen pen(Qt::NoBrush, 1, Qt::DashLine); pen.setColor(Qt::black); @@ -97,7 +99,7 @@ QVector VPoster::Borders(QGraphicsItem *parent, const PosterDat line->setLine(rec.x(), rec.y(), rec.x(), rec.y() + rec.height()); data.append(line); - auto *scissors = new QGraphicsPixmapItem(QPixmap("://scissors_vertical.png"), parent); + auto *scissors = new QGraphicsPixmapItem(QPixmap(QStringLiteral("://scissors_vertical.png")), parent); scissors->setPos(rec.x(), rec.y() + rec.height()-static_cast(allowance)); data.append(scissors); } @@ -118,28 +120,17 @@ QVector VPoster::Borders(QGraphicsItem *parent, const PosterDat line->setLine(rec.x(), rec.y(), rec.x() + rec.width(), rec.y()); data.append(line); - auto *scissors = new QGraphicsPixmapItem(QPixmap("://scissors_horizontal.png"), parent); + auto *scissors = new QGraphicsPixmapItem(QPixmap(QStringLiteral("://scissors_horizontal.png")), parent); scissors->setPos(rec.x() + rec.width()-static_cast(allowance), rec.y()); data.append(scissors); } - if (img.rows*img.columns > 1) - { // Don't show bottom border if only one page need - // Bottom border (mandatory) - auto *line = new QGraphicsLineItem(parent); - line->setPen(pen); - line->setLine(rec.x(), rec.y() + rec.height()-static_cast(allowance), - rec.x() + rec.width(), rec.y() + rec.height()-static_cast(allowance)); - data.append(line); - - if (img.row == img.rows-1) - { - auto *scissors = new QGraphicsPixmapItem(QPixmap("://scissors_horizontal.png"), parent); - scissors->setPos(rec.x() + rec.width()-static_cast(allowance), - rec.y() + rec.height()-static_cast(allowance)); - data.append(scissors); - } - } + // Bottom border (mandatory) + auto *line = new QGraphicsLineItem(parent); + line->setPen(pen); + line->setLine(rec.x(), rec.y() + rec.height()-static_cast(allowance), + rec.x() + rec.width(), rec.y() + rec.height()-static_cast(allowance)); + data.append(line); // Labels auto *labels = new QGraphicsTextItem(parent);