| Summary: | Missing canUndo check in Compound Commands undo implementation | ||
|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Suresh Mathew <suresh.mathew> |
| Component: | GEF-Legacy GEF (MVC) | Assignee: | gef-inbox <gef-inbox> |
| Status: | RESOLVED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | nyssen, suresh.mathew |
| Version: | 3.2.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Suresh Mathew
The Javadoc of Command.undo() states the following: /** * Undoes the changes performed during <code>execute()</code>. This method should only be * called after <code>execute</code> has been called, and only when <code>canUndo()</code> * returns <code>true</code>. * @see #canUndo() */ According to this, CompoundCommand.undo() does not have to check canUndo(). Instead, a client would have to call canUndo() (which is implemented correctly, as it evaluates the canUndo() results of all its composed commands) before calling undo() on the compound command. |