- Timestamp:
- 09/05/2017 01:18:00 PM (9 years ago)
- Location:
- trunk/src/scriptbuilder
- Files:
-
- 4 edited
-
gui/IncidentEditorFrame.java (modified) (1 diff)
-
structures/ScriptEvent.java (modified) (1 diff)
-
structures/ScriptIncident.java (modified) (1 diff)
-
structures/TimeSlice.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/scriptbuilder/gui/IncidentEditorFrame.java
r104 r107 307 307 public void windowClosing(WindowEvent e) 308 308 { 309 theIncident.setOffset(savedOffset); 309 //Add previous offset back in 310 //If we didn't adjust the offset, this will just set it to the old value 311 //If we deleted the first event(s), this will add the offsets, 312 //to ensure that events stay at the correct times 313 theIncident.setOffset(theIncident.offset + savedOffset); 310 314 parent.returnFocus(); 311 315 } -
trunk/src/scriptbuilder/structures/ScriptEvent.java
r89 r107 196 196 { 197 197 this.slice.events.remove(this); 198 this.slice.checkEmpty(); 198 199 } 199 200 -
trunk/src/scriptbuilder/structures/ScriptIncident.java
r106 r107 375 375 return this.number + " - " + this.name; 376 376 } 377 378 /** 379 * Remove the timeslice at the given position. 380 * 381 * @param seconds absolute start time of the timeslice to remove. 382 */ 383 public void removeTimeSlice(int seconds) 384 { 385 //remove the timeslice 386 this.slices.remove(seconds); 387 388 //offset is equivalent to start time of earliest slice 389 if(seconds == offset) 390 { 391 offset = slices.firstKey(); 392 } 393 this.updateLength(); 394 script.update(); 395 } 377 396 } -
trunk/src/scriptbuilder/structures/TimeSlice.java
r89 r107 297 297 || ev instanceof WitnessEvent || ev instanceof CADEvent; 298 298 } 299 300 public void checkEmpty() 301 { 302 if (this.events.isEmpty()) 303 { 304 this.thisIncident.removeTimeSlice(this.seconds); 305 } 306 } 299 307 }
Note: See TracChangeset
for help on using the changeset viewer.
