<< Click to Display Table of Contents >> Navigation: User Interface > Undo/Redo |
Undo/Redo can be triggered in several ways:
•Keyboard shortcuts
oCTRL-Z (undo)
oCTRL-Y (redo)
The program needs to have focus for this to work. It doesn't matter which component in the program has focus. The step is performed in the currently active project.
•Toolbar
Press the arrow to the left to undo, press the arrow to the right to redo. Undo is only enabled when at least one action has been performed. Redo is only enabled when an undo step is selected.
•Menu Edit -> Undo/Redo
•Undo/Redo list in Undo/Redo window
The undo/redo buttons are only enabled if actions were done (undo) and undo steps were selected (redo).
The number next to the undo/redo buttons show how many steps were recorded since starting the program / opening the project.
This toggle button enables/disables tooltips of undo entries in the undo history list
This toggle button enables/disables mouse navigation in the undo history list
The undo history list always starts with "Start: <project name>".
All modifications in the project create an entry in this list. If you happen to find an action that does NOT create an entry even though it should, let us know.
The list is currently limited to 1000 entries. If the 1001st action is made, the first entry in the list will be deleted and so on.
The following actions create an entry in the undo history:
•Graphical Object changes (all objects in the project tree) in the category:
oPages (MiniView-Pages)
oAlarms
oVKBs
oAll Property/Event and Move/Resize changes
•Communication Object changes (all objects in the project tree) in the category
oCommunication (Add/Remove/Update Communication objects)
oAll Property/Event changes
•JS changes (all JS files in the project tree) in the category
oJavaScripts (Add/Remove/Rename/Update JS files)
•Project-Properties/Project-Event changes
•All dialog changes which modify the project
oSimulation-Settings
oVariable-Manager
oTerminal and Owner(ECUs) Configuration...
oPort Configuration
oConfigure Mappings Dialog
oCAN-Freestyle: Transmit-Sequences
oCAN-Freestyle: CAN-ID Masks
oJ1939: DM1/DM2 Settings
oImport Variables
oImport DBC-File
oDataType definitions
oProcess Configuration
•Current/Default Language/Unit changes
•Hide/Show object changes
•Day/Night Mode changes
Each list entry contains 3 elements:
1.Icon
2.Presentation Name
3.Tooltip
Icon
•For graphical objects the icon of the object is used which was updated.
•For communication objects the icon of the appropriate object is used
•For JS changes the JS icon is used.
•For Project-Property changes, the project icon is used.
•Simulation-Settings the PClient icon is used
•For Day/Night Mode changes the Day/Night Icon is used
•For CAN-Mapping changes the Mapping Icon is used.
•For Protocol changes the Network icon is used.
•All other changes uses the Project icon
Presentation Name
•Graphical Objects
oProperty-Changes: [<Page-Name>]: <Object-Name>: <Property-Name>
oEvent-Changes: [<Page-Name>]: <Object-Name>: <Event-Name>
oMove-Changes: [<Page-Name>]: <Object-Name>: Move
oResize-Changes: [<Page-Name>]: <Object-Name>: Resize
oAdd/Remove: : [<Page-Name>]: <Object-Name>: Add/Remove
•Communication Objects
oProperty-Changes: [Project]: <Object-Name>: <Property-Name>
oEvent-Changes: [Project]: <Object-Name>: <Event-Name>
•JS-Objects
oAdd: [JavaScripts]: <JS-FileName>: Add
oRemove: [JavaScripts]: <JS-FileName>: Remove
oRename: [JavaScripts]: <New-JS-FileName>: Rename
•Dialog changes
oUpdate: [Project]: <Dialog-Name>: updated
Tooltip
•Graphical Objects
oProperty/Event changes: Old-Value and New-Value is shown
oMove changes: Old-Location and New-Location is shown
oResize changes: Old-Location/Size and New-Location/Size is shown
•Communication Objects
oProperty/Event changes: Old-Value and New-Value is shown
•JS-Objects
oRename: Old-Name and New-Name is shown
•Dialog changes
oCommon: No specific informations
oDBC-Import: Import-Count of Variables/CAN-Mappings/ECUs is shown
oVariable-Import: Variable-Count is shown + Variables-Names (only 10)
Note: The Time-Stamp (TS) is always shown in the tooltip for all Undo-entries.
JavaScript Undo-Edits
Like mentioned before, all JS changes on the File System can be reverted by Undo/Redo.
Each JS (and each version) will be saved in folder <Project-Folder>/tempScripts
The folder tempScripts will be deleted when the project is closed.
The JavaScriptHandler creates MD5 sums of all JS-Files and saves each version in tempScripts folder (the syntax is: <js_name>.js_<md5>).
It doesn't matter if a JS file is added/removed or updated in the project or on the FS, the JavaScriptHandler tracks all changes and creates the appropriate Undo-Edits in the UndoRedoHandler.
The JS files will be scanned each second on the FS for updates.
If a JS files is opened in JavaScript-Editor, the editor will be closed if the js file gets deleted by the UndoRedoHandler. (This can take a few seconds ~2s)
If the UndoRedoHandler restores an older JS file version, and the JavaScript-Editor of the restored file is opened, it takes at least 2 seconds until the editor is refreshed.
Note: If a JavaScript-Editor has focus and Ctrl+Z or Ctrl+Z is pressed, the UndoRedoHandler of the JavaScript-Editor will be called (not the Projektor-UndoRedoHandler)
Graphical-Object Undo-Edits
•Pages/Alarms and VKBs
Creating/Deleting a Page/MiniViewPage/Alarm/VKB creates an Undo-Edit.
If the UndoRedoHandler deletes a Page/Alarm or VKB the appropriate TopComponent-Window will be closed as well.
If the UndoRedoHandler restores a Page/Alarm or VKB the TopComponent-Window won't be opened again.
•Other objects (Frames, String Fields, Buttons, Softkeys,...)
If the UndoRedoHandler adds/removes or updates one of these objects, the appropriate page will be opened and the object will be selected on the scene.
=> If more than one object is affected all objects will be selected
•Moving/Resizing Objects on the scene
If one or more objects are moved or resized on the scene, only one undo edit will be created
=> The undo edit will be created when mouse release event occured.
=> The edit is directly created when the first update occurs, but all following updates/undo edits will be merged into the first undo edit.
Communication-Object Undo-Edits
If Undo/Redo for Communication-Objects is performed, the appropriate change will be undone/redone but the engaged objects won't be selected in project tree or variable view.
Automatic Merge
The UndoRedoHandler has an automatic merge mechanism of undo entries. If several undo entries are triggered within 500ms, these entries will be merged to one entry.
This mechanism is used e.g. if the the property Dependency of a String Field is updated from None to Language. All Language dependent properties(Preview Value, Font, ...) are changed now (from Single Value to a Value-Map) and these changes will be merged. If that wasn't done, the user would be able undo each single Property-Change-Edit, which would lead to an inconsistency.
The same mechanism is used if e.g. the data type of a Variable is changed. Consequently, all data dype dependent properties are updated (Min-,Max- and Default-Value) and will be merged to one undo entry.
Another example for the automatic merge is creating a VKB. During the creation a lot of objects will be created. With the automatic merge the whole creation process will be merged to one undo entry.