- Timestamp:
- 01/20/2020 07:04:14 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/scriptbuilder/gui/ScriptBuilderFrame.java
r189 r192 2225 2225 private void fileNewActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_fileNewActionPerformed 2226 2226 {//GEN-HEADEREND:event_fileNewActionPerformed 2227 if(!script.saved) 2228 { 2229 int confirm = JOptionPane.showConfirmDialog(this, 2230 "Previous scenario is NOT saved. Continue with creating a new scenario?","Warning",JOptionPane.YES_NO_OPTION); 2231 if (confirm == JOptionPane.YES_OPTION) 2232 { 2233 createNewScript(); 2234 } 2235 }else 2236 { 2237 createNewScript(); 2238 } 2239 2240 }//GEN-LAST:event_fileNewActionPerformed 2241 2242 private void createNewScript() 2243 { 2227 2244 script = new SimulationScript(); 2228 2245 loadCHPunits(); … … 2230 2247 this.update(null, script); 2231 2248 repaint(); 2232 }//GEN-LAST:event_fileNewActionPerformed 2233 2249 } 2234 2250 /** 2235 2251 * Allows the user to delete an incident from the current script.
Note: See TracChangeset
for help on using the changeset viewer.
