1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:27:45 +00:00

LibGUI: Remember modified state on undo/redo actions

This commit is contained in:
Carlos César Neves Enumo 2021-05-05 14:09:43 -03:00 committed by Andreas Kling
parent 67537bfc80
commit 928f16d360
5 changed files with 39 additions and 12 deletions

View file

@ -122,8 +122,8 @@ public:
virtual bool is_code_document() const { return false; }
bool is_empty() const;
bool is_modified() const { return m_modified; }
void set_modified(bool);
bool is_modified() const { return m_undo_stack.is_current_modified(); }
void set_unmodified();
protected:
explicit TextDocument(Client* client);
@ -136,7 +136,6 @@ private:
HashTable<Client*> m_clients;
bool m_client_notifications_enabled { true };
bool m_modified { false };
UndoStack m_undo_stack;
RefPtr<Core::Timer> m_undo_timer;