Finish 1.5.87

This commit is contained in:
Arin Alexander 2021-06-01 23:34:00 +03:00
commit 409e8b1819
4 changed files with 7 additions and 2 deletions

View File

@ -126,7 +126,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc
LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MAJOR = 1
LIMEREPORT_VERSION_MINOR = 5 LIMEREPORT_VERSION_MINOR = 5
LIMEREPORT_VERSION_RELEASE = 86 LIMEREPORT_VERSION_RELEASE = 87
LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}'
DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\"

View File

@ -85,6 +85,7 @@ private:
QColor m_previewPageBackgroundColor; QColor m_previewPageBackgroundColor;
QPrinter* m_defaultPrinter; QPrinter* m_defaultPrinter;
void printPages(QPrinter *printer); void printPages(QPrinter *printer);
bool m_scaleChanging;
}; };
} // namespace LimeReport } // namespace LimeReport

View File

@ -89,7 +89,7 @@ PreviewReportWidget::PreviewReportWidget(ReportEngine *report, QWidget *parent)
QWidget(parent), QWidget(parent),
ui(new Ui::PreviewReportWidget), d_ptr(new PreviewReportWidgetPrivate(this)), ui(new Ui::PreviewReportWidget), d_ptr(new PreviewReportWidgetPrivate(this)),
m_scaleType(FitWidth), m_scalePercent(0), m_previewPageBackgroundColor(Qt::white), m_scaleType(FitWidth), m_scalePercent(0), m_previewPageBackgroundColor(Qt::white),
m_defaultPrinter(0) m_defaultPrinter(0), m_scaleChanging(false)
{ {
ui->setupUi(this); ui->setupUi(this);
d_ptr->m_report = report->d_ptr; d_ptr->m_report = report->d_ptr;
@ -299,6 +299,7 @@ void PreviewReportWidget::saveToFile()
void PreviewReportWidget::setScalePercent(int percent) void PreviewReportWidget::setScalePercent(int percent)
{ {
m_scaleChanging = true;
ui->graphicsView->resetMatrix(); ui->graphicsView->resetMatrix();
d_ptr->m_scalePercent = percent; d_ptr->m_scalePercent = percent;
qreal scaleSize = percent/100.0; qreal scaleSize = percent/100.0;
@ -310,6 +311,7 @@ void PreviewReportWidget::setScalePercent(int percent)
m_scaleType = Percents; m_scaleType = Percents;
m_scalePercent = percent; m_scalePercent = percent;
} }
m_scaleChanging = false;
} }
void PreviewReportWidget::fitWidth() void PreviewReportWidget::fitWidth()
@ -425,6 +427,7 @@ void PreviewReportWidget::activateCurrentPage()
void PreviewReportWidget::slotSliderMoved(int value) void PreviewReportWidget::slotSliderMoved(int value)
{ {
if (m_scaleChanging) return;
int curPage = d_ptr->m_currentPage; int curPage = d_ptr->m_currentPage;
if (ui->graphicsView->verticalScrollBar()->minimum()==value){ if (ui->graphicsView->verticalScrollBar()->minimum()==value){
d_ptr->m_currentPage = 1; d_ptr->m_currentPage = 1;

View File

@ -85,6 +85,7 @@ private:
QColor m_previewPageBackgroundColor; QColor m_previewPageBackgroundColor;
QPrinter* m_defaultPrinter; QPrinter* m_defaultPrinter;
void printPages(QPrinter *printer); void printPages(QPrinter *printer);
bool m_scaleChanging;
}; };
} // namespace LimeReport } // namespace LimeReport