diff options
author | Ken Moore <ken@ixsystems.com> | 2018-01-24 14:26:20 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2018-01-24 14:26:20 -0500 |
commit | 1adfea70bef728d359818db15ee3f6339303e360 (patch) | |
tree | 7bfd8feb4fe73689c5481e041213be4c2954ffd6 /src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp | |
parent | Fix up the rendering quality of the lumina-pdf pages. (diff) | |
download | lumina-1adfea70bef728d359818db15ee3f6339303e360.tar.gz lumina-1adfea70bef728d359818db15ee3f6339303e360.tar.bz2 lumina-1adfea70bef728d359818db15ee3f6339303e360.zip |
Some more final changes to lumina-pdf.
This is now completely useable as full-fledged PDF **viewer** (not editor yet).
Diffstat (limited to 'src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp')
-rw-r--r-- | src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp b/src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp index 30f94e32..d2f2cd46 100644 --- a/src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp +++ b/src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp @@ -36,10 +36,12 @@ PrintWidget::~PrintWidget() { void PrintWidget::fitView() { setZoomMode(FitInView); + setCurrentPage(publicPageNum); //Make sure we stay on the same page } void PrintWidget::fitToWidth() { setZoomMode(FitToWidth); + setCurrentPage(publicPageNum); //Make sure we stay on the same page } void PrintWidget::setZoomMode(ZoomMode mode) { @@ -103,6 +105,7 @@ void PrintWidget::setVisible(bool visible) { void PrintWidget::setCurrentPage(int pageNumber) { if(pageNumber < 0 || pageNumber > (pages.count()+1) ){ return; } publicPageNum = pageNumber; //publicly requested page number (+/- 1 from actual page range) + emit currentPageChanged(); if(pageNumber < 1 || pageNumber > pages.count()) return; int lastPage = curPage; @@ -134,6 +137,7 @@ void PrintWidget::generatePreview() { layoutPages(); curPage = qBound(1, curPage, pages.count()); publicPageNum = curPage; + emit currentPageChanged(); if (fitting){ fit(); } } @@ -196,6 +200,7 @@ void PrintWidget::updateCurrentPage() { if (newPage != curPage) { curPage = newPage; publicPageNum = curPage; + emit currentPageChanged(); } } |