Changeset 459 in tmcsimulator for trunk/src


Ignore:
Timestamp:
07/21/2019 05:38:16 PM (7 years ago)
Author:
jdalbey
Message:

addIncidentTab in SimulationManagerView? modified to be on EDT to fix #154.

Location:
trunk/src/tmcsim
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/tmcsim/application.properties

    r458 r459  
    1 #Fri, 19 Jul 2019 09:44:03 -0700 
     1#Sun, 21 Jul 2019 19:11:06 -0700 
    22 
    3 Application.revision=457 
     3Application.revision=458 
    44 
    5 Application.buildnumber=165 
     5Application.buildnumber=166 
  • trunk/src/tmcsim/client/cadclientgui/screens/IncidentEditor.java

    r59 r459  
    3131 * This class contains the view and controller for the IncidentEditor screen. 
    3232 * The view is built using a GUI builder plug-in, and the controller uses 
    33  * listeners to control how the view and data act. 
     33 * listeners to control how the view and data act.  The IncidentEditor is 
     34 * opened from the Inform CAD main menu. 
    3435 * 
    3536 * @author Stuart 
  • trunk/src/tmcsim/client/cadclientgui/screens/IncidentViewer.java

    r414 r459  
    6969        addBindings(); 
    7070    } 
    71  
    7271    /** 
    7372     * This method is called from within the constructor to initialize the form. 
     
    21192118    } 
    21202119 
    2121     // JD  Invoked by timer every 5 seconds. 
     2120    // JD  Invoked by timer every 5 seconds (Timer2 in ScreenManager). 
    21222121    public void refreshCommentsNotesTable() 
    21232122    { 
  • trunk/src/tmcsim/simulationmanager/SimulationManagerView.java

    r416 r459  
    2626import javax.swing.JTable; 
    2727import javax.swing.SpinnerNumberModel; 
     28import javax.swing.SwingUtilities; 
    2829import javax.swing.border.CompoundBorder; 
    2930import javax.swing.border.EtchedBorder; 
     
    181182     * @param logNumber Log number for this incident. 
    182183     */  
    183     public void addIncidentTab(Integer logNumber) { 
    184          
    185         IncidentHistoryPanel newHistoryPanel = new IncidentHistoryPanel(); 
    186      
    187         incidentTableMap.put(logNumber, newHistoryPanel); 
    188  
    189         eventHistoryPane.addTab(String.valueOf(logNumber), newHistoryPanel); 
    190          
     184    public void addIncidentTab(final Integer logNumber) { 
     185        // Place this code on EDT to fix defect #154 
     186        SwingUtilities.invokeLater(new Runnable(){public void run(){ 
     187            IncidentHistoryPanel newHistoryPanel = new IncidentHistoryPanel(); 
     188 
     189            incidentTableMap.put(logNumber, newHistoryPanel); 
     190 
     191            eventHistoryPane.addTab(String.valueOf(logNumber), newHistoryPanel); 
     192        }}); 
    191193    } 
    192194     
Note: See TracChangeset for help on using the changeset viewer.