From 35b136944656c9ff9c3b064f47be08224f76c1f9 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 24 Sep 2026 18:56:08 +0200 Subject: feat: close the calendar's event pane with Escape Escape was scoped to the pane and only cancelled an edit, so once an event was selected nothing closed the pane again. It is a window shortcut now, labelled Close event: with no edit open it clears the selection and the pane hides. With an edit open it cancels only when focus is inside the pane, so a stray Escape after clicking the grid cannot discard the form. That guard needed the month grid to take focus on a click, which it never did; the view-scoped PgUp/PgDn, Delete and Ctrl+Z were likewise reachable only by Tab until now. Co-Authored-By: Claude Opus 5.5 --- src/monthview.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/monthview.cpp') diff --git a/src/monthview.cpp b/src/monthview.cpp index 202ef4a..5b56ee4 100644 --- a/src/monthview.cpp +++ b/src/monthview.cpp @@ -28,6 +28,9 @@ MonthView::MonthView(QWidget *parent) m_year(QDate::currentDate().year()), m_month(QDate::currentDate().month()) { setMinimumSize(420, 320); + // A click must move focus here, or it stays in the edit form and the + // view-scoped shortcuts and the Escape guard read the wrong widget. + setFocusPolicy(Qt::StrongFocus); } void MonthView::setMonth(int year, int month) -- cgit v1.2.3