diff --git a/sources/print/projectprintwindow.cpp b/sources/print/projectprintwindow.cpp
index 0900d970f..b6cd43ce1 100644
--- a/sources/print/projectprintwindow.cpp
+++ b/sources/print/projectprintwindow.cpp
@@ -410,6 +410,7 @@ void ProjectPrintWindow::setUpDiagramList()
connect(checkbox, &QCheckBox::clicked, m_preview, &QPrintPreviewWidget::updatePreview);
m_diagram_list_hash.insert(diagram, checkbox);
}
+ layout->addStretch();
}
QString ProjectPrintWindow::settingsSectionName(const QPrinter *printer)
@@ -653,17 +654,20 @@ void ProjectPrintWindow::print()
void ProjectPrintWindow::on_m_date_cb_userDateChanged(const QDate &date)
{
- on_m_uncheck_all_clicked();
-
auto index = ui->m_date_from_cb->currentIndex();
- // 0 = from the date
- // 1 = at the date
+ // 0 = all date
+ // 1 = from the date
+ // 2 = at the date
+
+ if (index) { on_m_uncheck_all_clicked(); }
+ else { on_m_check_all_pb_clicked(); }
+
for (auto diagram : m_diagram_list_hash.keys())
{
auto diagram_date = diagram->border_and_titleblock.date();
- if ( (index == 0 && diagram_date >= date) ||
- (index == 1 && diagram_date == date) )
+ if ( (index == 1 && diagram_date >= date) ||
+ (index == 2 && diagram_date == date) )
m_diagram_list_hash.value(diagram)->setChecked(true);
}
@@ -673,5 +677,13 @@ void ProjectPrintWindow::on_m_date_cb_userDateChanged(const QDate &date)
void ProjectPrintWindow::on_m_date_from_cb_currentIndexChanged(int index)
{
Q_UNUSED(index)
+
+ ui->m_date_cb->setEnabled(index);
+ ui->m_apply_date_pb->setEnabled(index);
+ on_m_date_cb_userDateChanged(ui->m_date_cb->date());
+
+}
+
+void ProjectPrintWindow::on_m_apply_date_pb_clicked() {
on_m_date_cb_userDateChanged(ui->m_date_cb->date());
}
diff --git a/sources/print/projectprintwindow.h b/sources/print/projectprintwindow.h
index 904ffb1ed..f7bfbcf50 100644
--- a/sources/print/projectprintwindow.h
+++ b/sources/print/projectprintwindow.h
@@ -72,12 +72,11 @@ class ProjectPrintWindow : public QMainWindow
void on_m_check_all_pb_clicked();
void on_m_uncheck_all_clicked();
void print();
-
void on_m_date_cb_userDateChanged(const QDate &date);
-
void on_m_date_from_cb_currentIndexChanged(int index);
+ void on_m_apply_date_pb_clicked();
- private:
+ private:
void requestPaint();
void printDiagram(Diagram *diagram, bool fit_page, QPainter *painter, QPrinter *printer);
QRect diagramRect(Diagram *diagram, const ExportProperties &option) const;
diff --git a/sources/print/projectprintwindow.ui b/sources/print/projectprintwindow.ui
index bd71472c1..99e1ea68e 100644
--- a/sources/print/projectprintwindow.ui
+++ b/sources/print/projectprintwindow.ui
@@ -7,7 +7,7 @@
0
0
956
- 554
+ 537
@@ -58,7 +58,7 @@
0
0
932
- 75
+ 58
@@ -80,7 +80,7 @@
-
-
+
9
@@ -98,6 +98,11 @@
-
+
-
+
+ Toutes les dates
+
+
-
À partir de la date du :
@@ -112,11 +117,31 @@
-
+
+ false
+
true
+ -
+
+
+ false
+
+
+
+
+
+
+ :/ico/16x16/dialog-ok.png:/ico/16x16/dialog-ok.png
+
+
+ true
+
+
+