Changeset 103 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder/gui/ScriptBuilderFrame.java


Ignore:
Timestamp:
09/01/2017 12:13:01 PM (9 years ago)
Author:
bmcguffin
Message:

Individual incident editor window now shows the relevant incident as though it started at 00:00:00. When window is closed, the incident is re-inserted into the correct position.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/scriptbuilder/gui/ScriptBuilderFrame.java

    r100 r103  
    2525import javax.swing.UIManager; 
    2626import javax.swing.UnsupportedLookAndFeelException; 
     27import javax.swing.event.ChangeEvent; 
    2728import scriptbuilder.gui.panels.IncidentTimelinePanel; 
    2829import scriptbuilder.structures.ScriptEvent; 
     
    15371538            script.incidents.get(indx).setOffset((Integer) addIncidentStart.getValue() * 60); 
    15381539            script.numberOfIncidents++; 
    1539             new IncidentEditorFrame(script.incidents.get(indx)).setVisible(true); 
     1540            new IncidentEditorFrame(script.incidents.get(indx), this).setVisible(true); 
    15401541        } 
    15411542        else//editing existing incident 
     
    17261727    }//GEN-LAST:event_incidentDetailsActionPerformed 
    17271728 
     1729    public void returnFocus() 
     1730    { 
     1731        zoomSlider.setValue(zoomSlider.getMinimum()); 
     1732        zoomSliderStateChanged(new ChangeEvent(script)); 
     1733    } 
     1734     
    17281735    public void incidentDetailsScreen(ScriptIncident i) 
    17291736    { 
     
    19942001            if (inc != null) 
    19952002            { 
    1996                 IncidentEditorFrame editor = new IncidentEditorFrame(inc); 
     2003                IncidentEditorFrame editor = new IncidentEditorFrame(inc, this); 
    19972004                script.addObserver(editor); 
    19982005                editor.setVisible(true); 
Note: See TracChangeset for help on using the changeset viewer.