Skip to content

Proper history command #12

@Lecrapouille

Description

@Lecrapouille

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions