Issue1
Undo states will be messed up by doing the following steps:
(1) Delete a component that connects to a node ( the node will be auto deleted).
(2) Click where the old is to start a new connection. A new node will be created there, a new connector connected to it, and wait to end connection.
(3) Cancle the connection by press ESC.
Then step 1 will become undoable.
Issue2
When restore a connector creation, the created connector is searched by its id. This can fail if node operations are not recored in undo ( like in the previous steps).
It may cause the "null connected node got when undo" bug.
This patch tries to fix them.
Note:
- I use a stack to replace the m_cicuitChange counter. Which is used as both a counter and a store of comp state start positions. When cancel a circuit modify, it's info is used to restore the comp states.
Undo states will be messed up by doing the following steps:
(1) Delete a component that connects to a node ( the node will be auto deleted).
(2) Click where the old is to start a new connection. A new node will be created there, a new connector connected to it, and wait to end connection.
(3) Cancle the connection by press ESC.
Then step 1 will become undoable.
Issue2
When restore a connector creation, the created connector is searched by its id. This can fail if node operations are not recored in undo ( like in the previous steps).
It may cause the "null connected node got when undo" bug.
This patch tries to fix them.
Note:
- I use a stack to replace the m_cicuitChange counter. Which is used as both a counter and a store of comp state start positions. When cancel a circuit modify, it's info is used to restore the comp states.
- Attachments
- undo.zip
- You don't have permission to download attachments.
- (2 Kb) Downloaded 2 times