MCPcopy Create free account
hub / github.com/BehaviorTree/Groot / onPushUndo

Method onPushUndo

bt_editor/mainwindow.cpp:631–643  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

629}
630
631void MainWindow::onPushUndo()
632{
633 SavedState saved = saveCurrentState();
634
635 if( _undo_stack.empty() || ( saved != _current_state && _undo_stack.back() != _current_state) )
636 {
637 _undo_stack.push_back( std::move(_current_state) );
638 _redo_stack.clear();
639 }
640 _current_state = saved;
641
642 //qDebug() << "P: Undo size: " << _undo_stack.size() << " Redo size: " << _redo_stack.size();
643}
644
645void MainWindow::onUndoInvoked()
646{

Callers

nothing calls this directly

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected