Skip to content

Commit

Permalink
3.1.1 - Finalize redo function
Browse files Browse the repository at this point in the history
  • Loading branch information
Lains committed Dec 3, 2021
1 parent 029c30c commit 0c515d1
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/Widgets/UI.vala
Original file line number Diff line number Diff line change
Expand Up @@ -333,15 +333,12 @@ namespace DotMatrix {
public void redo () {
if (history_paths != null) {
unowned List<Path> h_last = history_paths.last ();
unowned List<Path> last = current_paths.last ();
if (current_path != null) {
if (h_last.next != null) {
current_path = h_last.next.data;
}
if (h_last != null) {
if (h_last.next == null) {
window.redo_button.sensitive = false;
} else {
window.redo_button.sensitive = true;
if (last != null) {
current_path = last.data;
if (last.next == null) {
window.redo_button.sensitive = false;
}
}
}
Expand Down

0 comments on commit 0c515d1

Please sign in to comment.