Intuitive binding of (undo/redo) actions
Undo/redo and their hotkey are only working if focus is on an item in Model Navigator. Except Component Architecture Editor, if focus is on any other editor, the undo/redo function is not working.
#2 Updated by Simon Barner almost 6 years ago
- Subject changed from Undo/redo bug to Undo/redo bug when deleting elements from Model Navigator
- Status changed from Rejected to New
- Assignee deleted (
- Target version set to AF3 2.7 RC2 (GUI improved)
Reopening since this bug is still present.
Steps to reproduce
- Create a new project
- Create a component architecture
- Add a component
- Select (click onto) the component in the model navigator
- Delete the component (e.g., using the context menu or the DEL key)
- Observe that undo does not work (CTRL+Z has no effect, Undo is grayed out in the Edit menu)
- The problems seems to occur because after the delete operation, no object is selected.
- Hence, a possible workaround is to ensure that the selection is not empty, e.g. by programmatically setting the selection to the container of the deleted object in the model navigator
#5 Updated by Simon Barner almost 6 years ago
- Tracker changed from Bug to Feature
- Status changed from Closed to New
- Assignee deleted (
- Priority changed from Low to Normal
- Target version changed from AF3 2.7 RC2 (GUI improved) to AF3 2.8 RC1 (Feature Freeze)
- Reopening, because the old (partial) and now reverted workaround NavigatorViewPart (for this issue) and also the workaround in DiagramEditorBase (for #2207 and this issue) are only partial
- Summing up:
- Undo/redo of operations on the model only works if either the NavigatorViewPart or a DiagramEditorBase has the focus
- This makes sense if the active view provides editable items itself (e.g., the GenericAnnotationView) and provides undo/redo (currently not the case for GenericAnnotationView).
- For other (read-only) view (e.g., Model Markers), this behavior is confusing for the user
- Desired feature
- Provide undo/redo also for those cases from above where undo/redo is currently disabled.
- The context of the action binding should be "most intuitive" to the user, e.g. restrict undo/redo to the scope of editable views, and bind theses action to the model level for read-only views