aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDirk Fauth2013-07-26 09:58:11 (EDT)
committerDirk Fauth2013-07-26 09:58:11 (EDT)
commit9bde3dd93aaec31dbc272f8ca31ddfc16a1f2ea8 (patch)
tree4c09e769ca6c1fd11917ea896a8ceb91e9a1fc92
parent60c140d697672465dbf9b1e74e26921452ef0d10 (diff)
downloadorg.eclipse.nebula-9bde3dd93aaec31dbc272f8ca31ddfc16a1f2ea8.zip
org.eclipse.nebula-9bde3dd93aaec31dbc272f8ca31ddfc16a1f2ea8.tar.gz
org.eclipse.nebula-9bde3dd93aaec31dbc272f8ca31ddfc16a1f2ea8.tar.bz2
Bug 413815 - Set the _preMove properties in GanttEvent to null if the
corresponding event values are null
-rw-r--r--widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/GanttEvent.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/GanttEvent.java b/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/GanttEvent.java
index b816dca..e43f744 100644
--- a/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/GanttEvent.java
+++ b/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/GanttEvent.java
@@ -1766,21 +1766,29 @@ public class GanttEvent extends AbstractGanttEvent implements IGanttChartItem, C
final Calendar cal = Calendar.getInstance();
cal.setTime(_startDate.getTime());
_preMoveDateEstiStart = cal;
+ } else {
+ _preMoveDateEstiStart = null;
}
if (_endDate != null) {
final Calendar cal = Calendar.getInstance();
cal.setTime(_endDate.getTime());
_preMoveDateEstiEnd = cal;
+ } else {
+ _preMoveDateEstiEnd = null;
}
if (_revisedStart != null) {
final Calendar cal = Calendar.getInstance();
cal.setTime(_revisedStart.getTime());
_preMoveDateRevisedStart = cal;
+ } else {
+ _preMoveDateRevisedStart = null;
}
if (_revisedEnd != null) {
final Calendar cal = Calendar.getInstance();
cal.setTime(_revisedEnd.getTime());
_preMoveDateRevisedEnd = cal;
+ } else {
+ _preMoveDateRevisedEnd = null;
}
_preMoveBounds = new Rectangle(_x, _y, _width, _height);
@@ -1813,7 +1821,8 @@ public class GanttEvent extends AbstractGanttEvent implements IGanttChartItem, C
}
GanttSection gs = null;
- if (_preMoveGanttSectionIndex > -1) {
+ if (_preMoveGanttSectionIndex > -1
+ && _preMoveGanttSectionIndex < _parentComposite.getGanttSections().size() ) {
gs = (GanttSection) _parentComposite.getGanttSections().get(_preMoveGanttSectionIndex);
}