Allow clicking on a date in the Statistics heatmap and have it open that page
This commit is contained in:
parent
34349c6133
commit
c2b2eee022
3 changed files with 52 additions and 1 deletions
|
|
@ -1163,6 +1163,14 @@ class MainWindow(QMainWindow):
|
|||
return
|
||||
|
||||
dlg = StatisticsDialog(self.db, self)
|
||||
|
||||
if hasattr(dlg, "_heatmap"):
|
||||
|
||||
def on_date_clicked(d: datetime.date):
|
||||
qd = QDate(d.year, d.month, d.day)
|
||||
self._open_date_in_tab(qd)
|
||||
|
||||
dlg._heatmap.date_clicked.connect(on_date_clicked)
|
||||
dlg.exec()
|
||||
|
||||
# ------------ Window positioning --------------- #
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue