Skip to content

Commit

Permalink
gui: Add getter for undo file index.
Browse files Browse the repository at this point in the history
  • Loading branch information
vzh committed Feb 11, 2024
1 parent 9bb4efc commit 45f75b5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libleptongui/include/prototype.h
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,9 @@ void o_undo_cleanup(void);
gboolean
o_undo_modify_viewport ();

int
schematic_undo_get_file_index ();

char*
schematic_undo_index_to_filename (int index);

Expand Down
11 changes: 11 additions & 0 deletions libleptongui/src/o_undo.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ static char* tmp_path = NULL;
#define UNDO_PADDING 5


/*! \brief Return current undo file index for backup names.
*
* \return The current file index.
*/
int
schematic_undo_get_file_index ()
{
return undo_file_index;
}


/*! \brief Return undo backup file name by index.
*
* \par Function Description
Expand Down

0 comments on commit 45f75b5

Please sign in to comment.