Index: trunk/src/scriptbuilder/gui/IncidentEditorFrame.java
===================================================================
--- trunk/src/scriptbuilder/gui/IncidentEditorFrame.java	(revision 98)
+++ trunk/src/scriptbuilder/gui/IncidentEditorFrame.java	(revision 103)
@@ -1,5 +1,5 @@
 /**
  * Frame for the Individual Incident Editor.
- * 
+ *
  * @author Bryan McGuffin
  * @version 2017/08/08
@@ -12,4 +12,6 @@
 import java.awt.event.KeyEvent;
 import java.awt.event.KeyListener;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
 import java.io.IOException;
 import java.util.ArrayList;
@@ -40,10 +42,14 @@
 public class IncidentEditorFrame extends javax.swing.JFrame implements Observer
 {
-    
+
     /**
      * The script incident currently being edited.
      */
     private ScriptIncident theIncident;
-    
+
+    private ScriptBuilderFrame parent;
+
+    private int savedOffset;
+
     /**
      * The current type of selected event.
@@ -232,12 +238,21 @@
      * Constructor. Prep new script model, initialize the GUI, and add listeners
      * for all buttons.
-     * 
-     * @param theIncident the Script Incident which this window will edit.
-     */
-    public IncidentEditorFrame(ScriptIncident theIncident)
+     *
+     * @param inc the Script Incident which this window will edit.
+     */
+    public IncidentEditorFrame(ScriptIncident inc, ScriptBuilderFrame topFrame)
     {
-        this.theIncident = theIncident;
+        this.theIncident = inc;
+        this.savedOffset = this.theIncident.offset;
+        this.theIncident.setOffset(0);
+        this.parent = topFrame;
         initComponents();
-        this.update(null, theIncident);
+
+        timelineTickPanel.update(theIncident, incidentTimelinePanel1);
+        timeStampPanel.update(theIncident, incidentTimelinePanel1);
+
+        incidentTimelinePanel1.timelinePanelUpdate(theIncident);
+
+        incidentNumberPanel1.update(theIncident);
         selectButton.addKeyListener(new TimelineKeyListener());
         cadButton.addKeyListener(new TimelineKeyListener());
@@ -261,5 +276,4 @@
 //        zoomSlider.setValue(zoomSlider.getValue() - 1);
 //        zoomSlider.setValue(zoomSlider.getValue() + 1);
-
         // Set listener for scroll pane
         AdjustmentListener listener = new MyAdjustmentListener();
@@ -287,9 +301,20 @@
         eventButtons.add(facilitatorEvalButton);
         eventButtons.add(radioEvalButton);
-        
-        incidentNumber.setText(""+this.theIncident.number);
-        incidentName.setText(""+this.theIncident.name);
-        incidentDescription.setText(""+this.theIncident.description);
+
+        this.addWindowListener(new WindowAdapter()
+        {
+            @Override
+            public void windowClosing(WindowEvent e)
+            {
+                theIncident.setOffset(savedOffset);
+                parent.returnFocus();
+            }
+        });
+
+        incidentNumber.setText("" + this.theIncident.number);
+        incidentName.setText("" + this.theIncident.name);
+        incidentDescription.setText("" + this.theIncident.description);
         zoomSlider.setValue(zoomSlider.getMinimum());
+        this.update(null, this.theIncident);
     }
 
@@ -310,5 +335,5 @@
         {
             theIncident = (ScriptIncident) arg;
-            
+
             timelineTickPanel.update(theIncident, incidentTimelinePanel1);
             timeStampPanel.update(theIncident, incidentTimelinePanel1);
@@ -329,5 +354,5 @@
         {
             TimeSlice slice = ((SliceChangedEvent) arg).slice;
-            
+
             DefaultListModel model = new DefaultListModel();
             for (I_ScriptEvent e : slice.events)
