mirror of https://github.com/procxx/kepka.git
Fix crash in right click on CalendarBox.
Any attempt to destroy a widget on right click will crash, because Qt anyway sends QContextMenuEvent to the same widget. Fixes #6464.
This commit is contained in:
parent
17fba16c23
commit
7be1c4ca2f
|
@ -389,8 +389,10 @@ void CalendarBox::Inner::mouseReleaseEvent(QMouseEvent *e) {
|
|||
auto pressed = _pressed;
|
||||
setPressed(kEmptySelection);
|
||||
if (pressed != kEmptySelection && pressed == _selected) {
|
||||
const auto onstack = _dateChosenCallback;
|
||||
onstack(_context->dateFromIndex(pressed));
|
||||
crl::on_main(this, [=] {
|
||||
const auto onstack = _dateChosenCallback;
|
||||
onstack(_context->dateFromIndex(pressed));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue