Skip to content

Commit

Permalink
Add (basic) support for checking if there is unsaved edits
Browse files Browse the repository at this point in the history
  • Loading branch information
MinusGix committed Sep 10, 2019
1 parent 3168a9e commit d3ef345
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/herix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,11 @@ RedoInfo Herix::redo () {
return RedoInfo(edits.redoR());
}

bool Herix::hasUnsavedEdits () const {
// FIXME: this needs to be changed once there's ways of saving other than
return canUndo();
}

bool Herix::canUndo () const {
return edits.canUndo();
}
Expand Down
2 changes: 2 additions & 0 deletions src/herix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ class Herix {
UndoInfo undo ();
RedoInfo redo ();

bool hasUnsavedEdits () const;

bool canUndo () const;
bool canRedo () const;

Expand Down

0 comments on commit d3ef345

Please sign in to comment.