diff --git a/gui.py b/gui.py index 0d93186..64f895b 100644 --- a/gui.py +++ b/gui.py @@ -1,6 +1,7 @@ from tkinter import PhotoImage from tkinter import * from tkinter import ttk +from turtle import undo from proof import * from tkinter.scrolledtext import ScrolledText import fitz @@ -122,6 +123,9 @@ def detect_pressed(event): entry_bar.bind('', detect_pressed) entry_bar.bind('', check_empty) +def undo(*args): + p.undo() + showing.set(p.showReturn()) #entry_bar = AutocompleteCombobox(mainframe, width=50, textvariable=entry, completevalues = proof_methods) @@ -134,6 +138,8 @@ def detect_pressed(event): ttk.Button(mainframe, text="Enter", command=enter).grid(column=3, row=3, sticky=W) +ttk.Button(mainframe, text="Undo", command=undo).grid(column=3, row=2, sticky=W) + ttk.Button(mainframe, text="Generate Latex", command=generateLaTeX).grid(column=3, row=4, sticky=W) suggestions = StringVar()