1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:57:43 +00:00

LibGUI: Make GUI::UndoStack remember time it was last set to unmodified

This can be used to determine how much time has passed since a document
was saved. :^)
This commit is contained in:
Andreas Kling 2022-01-04 17:32:19 +01:00
parent c08872f5da
commit c4cc796f86
2 changed files with 5 additions and 0 deletions

View file

@ -80,6 +80,7 @@ void UndoStack::set_current_unmodified()
return;
m_clean_index = m_stack_index;
m_last_unmodified_timestamp = Time::now_monotonic();
if (on_state_change)
on_state_change();