From 7d4f83689a512f3af1a4002a1567ffbb2762ebb9 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 9 Jun 2008 10:09:05 +0000 Subject: ** Fix for bug #536813 2008-06-09 Milan Crha ** Fix for bug #536813 * gui/comp-util.h: (is_icalcomp_on_the_server): * gui/comp-util.c: (is_icalcomp_on_the_server): Similar helper function as cal_comp_is_on_server only the parameter is icalcomponent. * gui/e-week-view-event-item.c: (e_week_view_event_item_double_click): * gui/e-week-view.c: (e_week_view_on_text_item_event): Do not start to edit the event on the double click if the event is not on the server yet. Storing the event can cause the renumbering events so the result can be that the edited event would be different. svn path=/trunk/; revision=35618 --- calendar/gui/e-week-view.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'calendar/gui/e-week-view.c') diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index b1290069f7..442003320d 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -3100,6 +3100,11 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item, event = &g_array_index (week_view->events, EWeekViewEvent, event_num); + /* if we started to editing new item on the canvas, then do not open editing dialog until it's saved, + because the save of the event recalculates event numbers and you can edit different one */ + if (!is_icalcomp_on_the_server (event->comp_data->icalcomp, event->comp_data->client)) + return TRUE; + e_calendar_view_edit_appointment (E_CALENDAR_VIEW (week_view), event->comp_data->client, event->comp_data->icalcomp, FALSE); -- cgit