diff --git a/common.pri b/common.pri index 829478f..56cb45d 100644 --- a/common.pri +++ b/common.pri @@ -126,7 +126,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 5 -LIMEREPORT_VERSION_RELEASE = 86 +LIMEREPORT_VERSION_RELEASE = 87 LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" diff --git a/include/lrpreviewreportwidget.h b/include/lrpreviewreportwidget.h index 1e24e9b..797acdb 100644 --- a/include/lrpreviewreportwidget.h +++ b/include/lrpreviewreportwidget.h @@ -85,6 +85,7 @@ private: QColor m_previewPageBackgroundColor; QPrinter* m_defaultPrinter; void printPages(QPrinter *printer); + bool m_scaleChanging; }; } // namespace LimeReport diff --git a/limereport/lrpreviewreportwidget.cpp b/limereport/lrpreviewreportwidget.cpp index 636bcb9..49de4c1 100644 --- a/limereport/lrpreviewreportwidget.cpp +++ b/limereport/lrpreviewreportwidget.cpp @@ -89,7 +89,7 @@ PreviewReportWidget::PreviewReportWidget(ReportEngine *report, QWidget *parent) QWidget(parent), ui(new Ui::PreviewReportWidget), d_ptr(new PreviewReportWidgetPrivate(this)), m_scaleType(FitWidth), m_scalePercent(0), m_previewPageBackgroundColor(Qt::white), - m_defaultPrinter(0) + m_defaultPrinter(0), m_scaleChanging(false) { ui->setupUi(this); d_ptr->m_report = report->d_ptr; @@ -299,6 +299,7 @@ void PreviewReportWidget::saveToFile() void PreviewReportWidget::setScalePercent(int percent) { + m_scaleChanging = true; ui->graphicsView->resetMatrix(); d_ptr->m_scalePercent = percent; qreal scaleSize = percent/100.0; @@ -310,6 +311,7 @@ void PreviewReportWidget::setScalePercent(int percent) m_scaleType = Percents; m_scalePercent = percent; } + m_scaleChanging = false; } void PreviewReportWidget::fitWidth() @@ -425,6 +427,7 @@ void PreviewReportWidget::activateCurrentPage() void PreviewReportWidget::slotSliderMoved(int value) { + if (m_scaleChanging) return; int curPage = d_ptr->m_currentPage; if (ui->graphicsView->verticalScrollBar()->minimum()==value){ d_ptr->m_currentPage = 1; diff --git a/limereport/lrpreviewreportwidget.h b/limereport/lrpreviewreportwidget.h index 1e24e9b..797acdb 100644 --- a/limereport/lrpreviewreportwidget.h +++ b/limereport/lrpreviewreportwidget.h @@ -85,6 +85,7 @@ private: QColor m_previewPageBackgroundColor; QPrinter* m_defaultPrinter; void printPages(QPrinter *printer); + bool m_scaleChanging; }; } // namespace LimeReport