month-view: fix button release behaviour

When starting from invalid cell button_release vfunc didnt check
properly the value of the first clicked cell, this led to non-sense
dates on new-event popover.
This commit is contained in:
Erick Pérez Castellanos
2015-01-29 09:56:31 -05:00
parent 8af1e6c02a
commit 79ea0817b0
+1 -1
View File
@@ -1500,7 +1500,7 @@ gcal_month_view_button_release (GtkWidget *widget,
priv = gcal_month_view_get_instance_private (GCAL_MONTH_VIEW (widget));
ppriv = GCAL_SUBSCRIBER_VIEW (widget)->priv;
if (priv->clicked_cell == -1)
if (priv->clicked_cell == -1 || priv->start_mark_cell == -1)
return FALSE;
days = priv->days_delay + icaltime_days_in_month (priv->date->month, priv->date->year);