* Select an event\r
*\r
* @param n\r
- * 1 to enable, -1 to disable\r
+ * 1 for next event, -1 for previous event\r
*/\r
public void selectEvent(int n) {\r
if (null == _timeProvider) {\r
if (nextTime > endTime) {\r
nextTime = endTime;\r
}\r
+ } else if (n == -1) {\r
+ // for previous event go to its end time unless we were already there\r
+ if (nextEvent.getTime() + nextEvent.getDuration() < selectedTime) {\r
+ nextTime = nextEvent.getTime() + nextEvent.getDuration();\r
+ }\r
}\r
_timeProvider.setSelectedTimeNotify(nextTime, true);\r
fireSelectionChanged();\r