Changeset 82 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder/gui


Ignore:
Timestamp:
08/25/2017 03:33:39 PM (9 years ago)
Author:
bmcguffin
Message:

Fixed a bug that prevented the script builder frame from updating when the incident palette frame was closed.

Location:
trunk/src/scriptbuilder/gui
Files:
2 edited

Legend:

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

    r76 r82  
    2929    private SimulationScript script; 
    3030 
     31    private ScriptBuilderFrame parent; 
     32 
    3133    private SimulationScript dummyScript; 
    3234 
     
    4446     * added. 
    4547     */ 
    46     public IncidentPaletteFrame(SimulationScript scr) 
     48    public IncidentPaletteFrame(SimulationScript scr, ScriptBuilderFrame frame) 
    4749    { 
    4850        script = scr; 
     51 
     52        parent = frame; 
    4953 
    5054        panelAdd = new JPanel(); 
     
    381385    {//GEN-HEADEREND:event_btnClosePaletteActionPerformed 
    382386        script.update(); 
     387        parent.update(script, script); 
     388        parent.repaint(); 
    383389        this.dispose(); 
    384390    }//GEN-LAST:event_btnClosePaletteActionPerformed 
  • trunk/src/scriptbuilder/gui/ScriptBuilderFrame.java

    r81 r82  
    17881788 
    17891789    private void loadIncidentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_loadIncidentActionPerformed 
    1790         new IncidentPaletteFrame(script).setVisible(true); 
     1790        new IncidentPaletteFrame(script, this).setVisible(true); 
     1791        zoomSlider.setValue(zoomSlider.getMinimum()); 
    17911792    }//GEN-LAST:event_loadIncidentActionPerformed 
    17921793 
Note: See TracChangeset for help on using the changeset viewer.