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
Currently:
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