Changeset 130 in tmcsimulator-scriptbuilder for trunk/src/event/editor/frame/Editor.java


Ignore:
Timestamp:
10/23/2017 08:58:34 AM (9 years ago)
Author:
bmcguffin
Message:

Changed implementation of save function for event editor panels. Instead of updating their model objects whenever the enter key is pressed, panels are now notified when the window is closed and update their information then.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/event/editor/frame/Editor.java

    r119 r130  
    124124                } 
    125125            } 
     126 
    126127        } 
    127128 
     
    150151            public void keyReleased(KeyEvent e) 
    151152            { 
     153            } 
     154        }); 
     155        this.addWindowListener(new WindowAdapter() 
     156        { 
     157            @Override 
     158            public void windowClosing(WindowEvent e) 
     159            { 
     160                //Add previous offset back in 
     161                //If we didn't adjust the offset, this will just set it to the old value 
     162                //If we deleted the first event(s), this will add the offsets, 
     163                //to ensure that events stay at the correct times 
     164                model.closePanels(); 
    152165            } 
    153166        }); 
Note: See TracChangeset for help on using the changeset viewer.