mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fixed ability to open more than one calendar in schedule box.
This commit is contained in:
parent
50ab655af9
commit
beb2e7dc19
1 changed files with 5 additions and 1 deletions
|
@ -672,8 +672,12 @@ void ScheduleBox(
|
||||||
width);
|
width);
|
||||||
}, content->lifetime());
|
}, content->lifetime());
|
||||||
|
|
||||||
|
const auto calendar =
|
||||||
|
content->lifetime().make_state<QPointer<CalendarBox>>();
|
||||||
QObject::connect(dayInput, &Ui::InputField::focused, [=] {
|
QObject::connect(dayInput, &Ui::InputField::focused, [=] {
|
||||||
const auto calendar = std::make_shared<QPointer<CalendarBox>>();
|
if (*calendar) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const auto chosen = [=](QDate chosen) {
|
const auto chosen = [=](QDate chosen) {
|
||||||
*date = chosen;
|
*date = chosen;
|
||||||
(*calendar)->closeBox();
|
(*calendar)->closeBox();
|
||||||
|
|
Loading…
Add table
Reference in a new issue