From dc680d57aa9677b24bdda2ca2bf09a71b47fb3f6 Mon Sep 17 00:00:00 2001 From: rhin123 Date: Wed, 18 Mar 2020 11:21:54 -0500 Subject: [PATCH] Calendar: Don't assign next_month button variable to add_event button --- Applications/Calendar/CalendarWidget.cpp | 8 ++++---- Applications/Calendar/CalendarWidget.h | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Applications/Calendar/CalendarWidget.cpp b/Applications/Calendar/CalendarWidget.cpp index 821c0551dd..2b8b96a69c 100644 --- a/Applications/Calendar/CalendarWidget.cpp +++ b/Applications/Calendar/CalendarWidget.cpp @@ -49,10 +49,10 @@ CalendarWidget::CalendarWidget() update_calendar_tiles(m_target_year, m_target_month); }; - m_prev_month_button = add(); - m_prev_month_button->set_text("Add Event"); - m_prev_month_button->set_relative_rect(475, 13, 100, 25); - m_prev_month_button->on_click = [this] { + m_add_event_button = add(); + m_add_event_button->set_text("Add Event"); + m_add_event_button->set_relative_rect(475, 13, 100, 25); + m_add_event_button->on_click = [this] { AddEventDialog::show(m_calendar, window()); }; diff --git a/Applications/Calendar/CalendarWidget.h b/Applications/Calendar/CalendarWidget.h index 5dd60a0f53..930921be1d 100644 --- a/Applications/Calendar/CalendarWidget.h +++ b/Applications/Calendar/CalendarWidget.h @@ -20,6 +20,7 @@ private: RefPtr m_selected_date_label; RefPtr m_prev_month_button; RefPtr m_next_month_button; + RefPtr m_add_event_button; class CalendarTile final : public GUI::Frame { C_OBJECT(CalendarTile)