Fixed ability to open more than one calendar in schedule box.

This commit is contained in:
23rd 2020-06-09 11:52:42 +03:00 committed by John Preston
parent 50ab655af9
commit beb2e7dc19

View file

@ -672,8 +672,12 @@ void ScheduleBox(
width);
}, content->lifetime());
const auto calendar =
content->lifetime().make_state<QPointer<CalendarBox>>();
QObject::connect(dayInput, &Ui::InputField::focused, [=] {
const auto calendar = std::make_shared<QPointer<CalendarBox>>();
if (*calendar) {
return;
}
const auto chosen = [=](QDate chosen) {
*date = chosen;
(*calendar)->closeBox();