month-view: fix range selection
We add one day in order to have the all-day event span the selected days. If the range was selected from large day to a shorter one this was chopping one day of the range. Adding the extra day after the range has been sorted.
This commit is contained in:
@@ -1569,7 +1569,7 @@ gcal_month_view_button_release (GtkWidget *widget,
|
||||
start_date->is_date = 1;
|
||||
|
||||
end_date = gcal_dup_icaltime (priv->date);
|
||||
end_date->day = j - priv->days_delay + 1;
|
||||
end_date->day = j - priv->days_delay;
|
||||
end_date->is_date = 1;
|
||||
|
||||
if (start_date->day > end_date->day)
|
||||
@@ -1578,6 +1578,7 @@ gcal_month_view_button_release (GtkWidget *widget,
|
||||
start_date->day = end_date->day;
|
||||
end_date->day = day;
|
||||
}
|
||||
end_date->day += 1 ;
|
||||
|
||||
g_signal_emit_by_name (GCAL_VIEW (widget), "create-event", start_date, end_date, x, y);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user