Changeset 189 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder/gui/IncidentPaletteFrame.java
- Timestamp:
- 01/20/2020 06:16:07 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/scriptbuilder/gui/IncidentPaletteFrame.java
r137 r189 455 455 private void btnCreateIncidentActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnCreateIncidentActionPerformed 456 456 {//GEN-HEADEREND:event_btnCreateIncidentActionPerformed 457 int newLogNum = 100; 458 boolean found = false; 459 while (!found) 460 { 461 newLogNum++; 462 if (!scriptContainsLogNum(script, newLogNum)) 463 { 464 found = true; 465 for (ScriptIncident incident : incidentList) 466 { 467 if (incident.number == newLogNum) 468 { 469 found = false; 470 } 471 } 472 } 473 } 474 475 ScriptIncident newInc = new ScriptIncident(newLogNum, "New Incident", LocalDate.now().toString(), script); 476 if (script.addIncident(newInc)) 477 { 478 new IncidentEditorFrame(newInc, parent).setVisible(true); 479 this.dispose(); 480 } 457 parent.openIncidentCreateWindow(); 458 this.dispose(); 459 // int newLogNum = 100; 460 // boolean found = false; 461 // while (!found) 462 // { 463 // newLogNum++; 464 // if (!scriptContainsLogNum(script, newLogNum)) 465 // { 466 // found = true; 467 // for (ScriptIncident incident : incidentList) 468 // { 469 // if (incident.number == newLogNum) 470 // { 471 // found = false; 472 // } 473 // } 474 // } 475 // } 476 // parent. 477 // 478 // ScriptIncident newInc = new ScriptIncident(newLogNum, "New Incident", LocalDate.now().toString(), script); 479 // if (script.addIncident(newInc)) 480 // { 481 // new IncidentEditorFrame(newInc, parent).setVisible(true); 482 // this.dispose(); 483 // } 481 484 482 485 }//GEN-LAST:event_btnCreateIncidentActionPerformed
Note: See TracChangeset
for help on using the changeset viewer.
