mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibGUI: Clear undo stack when opening a new document
This commit is contained in:
parent
88803b2e34
commit
67537bfc80
Notes:
sideshowbarker
2024-07-18 18:39:29 +09:00
Author: https://github.com/pakerwreah
Commit: 67537bfc80
Pull-request: https://github.com/SerenityOS/serenity/pull/6868
Reviewed-by: https://github.com/awesomekling
3 changed files with 9 additions and 0 deletions
|
@ -80,4 +80,10 @@ void UndoStack::finalize_current_combo()
|
|||
m_stack.prepend(move(undo_commands_container));
|
||||
}
|
||||
|
||||
void UndoStack::clear()
|
||||
{
|
||||
m_stack.clear();
|
||||
m_stack_index = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue