Index: trunk/src/scriptbuilder/gui/panels/ScriptBuilderTimelinePanel.java
===================================================================
--- trunk/src/scriptbuilder/gui/panels/ScriptBuilderTimelinePanel.java	(revision 53)
+++ trunk/src/scriptbuilder/gui/panels/ScriptBuilderTimelinePanel.java	(revision 54)
@@ -11,4 +11,5 @@
 import javax.swing.JPanel;
 import javax.swing.event.MouseInputAdapter;
+import scriptbuilder.gui.IncidentEditorFrame;
 import scriptbuilder.gui.ScriptBuilderFrame;
 import scriptbuilder.gui.ScriptBuilderGuiConstants;
@@ -100,5 +101,14 @@
         {
             Editor ed = new Editor();
-            ScriptBuilderFrame f = (ScriptBuilderFrame) getTopLevelAncestor();
+            ScriptBuilderFrame f = null;
+            IncidentEditorFrame g = null;
+            if (getTopLevelAncestor() instanceof ScriptBuilderFrame)
+            {
+                f = (ScriptBuilderFrame) getTopLevelAncestor();
+            }
+            else if (getTopLevelAncestor() instanceof IncidentEditorFrame)
+            {
+                g = (IncidentEditorFrame) getTopLevelAncestor();
+            }
 
             x = cursorTime = e.getX();
@@ -142,17 +152,37 @@
             if (e.getButton() == MouseEvent.BUTTON1)
             {
-                if (f.currentEventType != null)
-                {
-                    I_ScriptEvent s = ScriptEvent.factoryByType(f.currentEventType);
-                    ed.addProperty(eventTypeToPropertyMap.get(f.currentEventType), s);
-                    if (incident.slices.get(newSlice) == null)
+                if (getTopLevelAncestor() instanceof ScriptBuilderFrame)
+                {
+                    if (f.currentEventType != null)
                     {
-                        incident.addNewEvent(s, newSlice);
+                        I_ScriptEvent s = ScriptEvent.factoryByType(f.currentEventType);
+                        ed.addProperty(eventTypeToPropertyMap.get(f.currentEventType), s);
+                        if (incident.slices.get(newSlice) == null)
+                        {
+                            incident.addNewEvent(s, newSlice);
+                        }
+                        else
+                        {
+                            incident.slices.get(newSlice).addEvent(s);
+                        }
+                        f.update(f.getScript(), f.getScript());
                     }
-                    else
+                }
+                if (getTopLevelAncestor() instanceof IncidentEditorFrame)
+                {
+                    if (g.currentEventType != null)
                     {
-                        incident.slices.get(newSlice).addEvent(s);
+                        I_ScriptEvent s = ScriptEvent.factoryByType(g.currentEventType);
+                        ed.addProperty(eventTypeToPropertyMap.get(g.currentEventType), s);
+                        if (incident.slices.get(newSlice) == null)
+                        {
+                            incident.addNewEvent(s, newSlice);
+                        }
+                        else
+                        {
+                            incident.slices.get(newSlice).addEvent(s);
+                        }
+                        g.update(null, g.getIncident());
                     }
-                    f.update(f.getScript(), f.getScript());
                 }
             }
@@ -294,14 +324,33 @@
 
         Graphics2D g2d = (Graphics2D) g;
-        IncidentTimelineDrawer.DrawScriptBuilderTimeline(g2d, incident);
+        if (getTopLevelAncestor() instanceof ScriptBuilderFrame)
+        {
+            IncidentTimelineDrawer.DrawScriptBuilderTimeline(g2d, incident);
+        }
+        if (getTopLevelAncestor() instanceof IncidentEditorFrame)
+        {
+            IncidentTimelineDrawer.DrawIncidentTimeline(g2d, incident, false);
+        }
 
         if (focused)
         {
             CursorDrawer.DrawCursor(g2d, cursorTime, false);
-            if (((ScriptBuilderFrame) this.getTopLevelAncestor()).currentEventType != null)
-            {
-                EventIconDrawer.DrawEventIcon(g2d,
-                        ((ScriptBuilderFrame) this.getTopLevelAncestor()).currentEventType,
-                        x + 5, y + 10);
+            if (this.getTopLevelAncestor() instanceof ScriptBuilderFrame)
+            {
+                if (((ScriptBuilderFrame) this.getTopLevelAncestor()).currentEventType != null)
+                {
+                    EventIconDrawer.DrawEventIcon(g2d,
+                            ((ScriptBuilderFrame) this.getTopLevelAncestor()).currentEventType,
+                            x + 5, y + 10);
+                }
+            }
+            if (this.getTopLevelAncestor() instanceof IncidentEditorFrame)
+            {
+                if (((IncidentEditorFrame) this.getTopLevelAncestor()).currentEventType != null)
+                {
+                    EventIconDrawer.DrawEventIcon(g2d,
+                            ((IncidentEditorFrame) this.getTopLevelAncestor()).currentEventType,
+                            x + 5, y + 10);
+                }
             }
         }
