implement simple stroke undo based on actions history
This commit is contained in:
@@ -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*) {
|
||||
|
||||
Reference in New Issue
Block a user