implement simple stroke undo based on actions history

This commit is contained in:
2017-04-16 01:57:54 +02:00
parent 357f37e3d0
commit 28fe61704f
10 changed files with 95 additions and 9 deletions

View File

@@ -420,6 +420,12 @@ void App::initLayout()
};
button->m_text->set_text("NORM");
}
if (auto* button = layout[main_id]->find<NodeButton>("btn-undo"))
{
button->on_click = [this,button](Node*) {
ActionManager::undo();
};
}
if (auto* button = layout[main_id]->find<NodeButton>("btn-close"))
{
button->on_click = [this](Node*) {