Fix crash on right click in ConfirmBox with link.
This commit is contained in:
parent
be74a391ba
commit
3e5e0cb9df
|
@ -304,12 +304,10 @@ void ConfirmBox::mouseReleaseEvent(QMouseEvent *e) {
|
||||||
_lastMousePos = e->globalPos();
|
_lastMousePos = e->globalPos();
|
||||||
updateHover();
|
updateHover();
|
||||||
if (const auto activated = ClickHandler::unpressed()) {
|
if (const auto activated = ClickHandler::unpressed()) {
|
||||||
const auto guard = window();
|
ActivateClickHandler(window(), activated, e->button());
|
||||||
Ui::hideLayer();
|
crl::on_main(this, [=] {
|
||||||
ActivateClickHandler(guard, activated, e->button());
|
closeBox();
|
||||||
|
});
|
||||||
// Keep the link alive, otherwise it is not activated.
|
|
||||||
crl::on_main([activated] {});
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
BoxContent::mouseReleaseEvent(e);
|
BoxContent::mouseReleaseEvent(e);
|
||||||
|
|
Loading…
Reference in New Issue