Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper history command #12

Open
Lecrapouille opened this issue Dec 17, 2023 · 0 comments
Open

Proper history command #12

Lecrapouille opened this issue Dec 17, 2023 · 0 comments

Comments

@Lecrapouille
Copy link
Owner

Currently:

 action = std::make_unique<NetModifaction>(m_editor);
action->before(m_editor.m_net);
modify net
action->after(m_editor.m_net);
m_editor.m_history.add(std::move(action));

this save 2 nets. Better to memorize add/remove actions and do the opposite (as classically made in Command design pattern) but here the remove modify the ID of nodes so not easy to undo/redo commands

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant