modelbutton: Emit ::clicked() before closing the popover

The clicked handler might still need the popover.
This commit is contained in:
Timm Bäder 2020-04-12 08:36:36 +02:00
parent 4851081a77
commit 57f913b753

View File

@ -971,6 +971,8 @@ gtk_model_button_clicked (GtkGestureClick *gesture,
double y, double y,
GtkModelButton *self) GtkModelButton *self)
{ {
g_signal_emit (self, signals[SIGNAL_CLICKED], 0);
if (self->menu_name != NULL) if (self->menu_name != NULL)
{ {
switch_menu (self); switch_menu (self);
@ -991,7 +993,6 @@ gtk_model_button_clicked (GtkGestureClick *gesture,
close_menu (self); close_menu (self);
} }
g_signal_emit (self, signals[SIGNAL_CLICKED], 0);
if (self->action_helper) if (self->action_helper)
gtk_action_helper_activate (self->action_helper); gtk_action_helper_activate (self->action_helper);