Index: trunk/src/scriptbuilder/structures/ScriptEvent.java
===================================================================
--- trunk/src/scriptbuilder/structures/ScriptEvent.java	(revision 89)
+++ trunk/src/scriptbuilder/structures/ScriptEvent.java	(revision 107)
@@ -196,4 +196,5 @@
     {
         this.slice.events.remove(this);
+        this.slice.checkEmpty();
     }
     
Index: trunk/src/scriptbuilder/structures/TimeSlice.java
===================================================================
--- trunk/src/scriptbuilder/structures/TimeSlice.java	(revision 89)
+++ trunk/src/scriptbuilder/structures/TimeSlice.java	(revision 107)
@@ -297,3 +297,11 @@
                 || ev instanceof WitnessEvent || ev instanceof CADEvent;
     }
+    
+    public void checkEmpty()
+    {
+        if (this.events.isEmpty())
+        {
+            this.thisIncident.removeTimeSlice(this.seconds);
+        }
+    }
 }
Index: trunk/src/scriptbuilder/structures/ScriptIncident.java
===================================================================
--- trunk/src/scriptbuilder/structures/ScriptIncident.java	(revision 106)
+++ trunk/src/scriptbuilder/structures/ScriptIncident.java	(revision 107)
@@ -375,3 +375,22 @@
         return this.number + " - " + this.name;
     }
+    
+    /**
+     * Remove the timeslice at the given position.
+     * 
+     * @param seconds absolute start time of the timeslice to remove.
+     */
+    public void removeTimeSlice(int seconds)
+    {
+        //remove the timeslice
+        this.slices.remove(seconds);
+        
+        //offset is equivalent to start time of earliest slice
+        if(seconds == offset)
+        {
+            offset = slices.firstKey();
+        }
+        this.updateLength();
+        script.update();
+    }
 }
Index: trunk/src/scriptbuilder/gui/IncidentEditorFrame.java
===================================================================
--- trunk/src/scriptbuilder/gui/IncidentEditorFrame.java	(revision 104)
+++ trunk/src/scriptbuilder/gui/IncidentEditorFrame.java	(revision 107)
@@ -307,5 +307,9 @@
             public void windowClosing(WindowEvent e)
             {
-                theIncident.setOffset(savedOffset);
+                //Add previous offset back in
+                //If we didn't adjust the offset, this will just set it to the old value
+                //If we deleted the first event(s), this will add the offsets,
+                //to ensure that events stay at the correct times
+                theIncident.setOffset(theIncident.offset + savedOffset);
                 parent.returnFocus();
             }
