From 0c515d1949e5e2d2925be06a5a3c9fbd62c8aee1 Mon Sep 17 00:00:00 2001 From: Lains Date: Fri, 3 Dec 2021 12:37:27 -0300 Subject: [PATCH] 3.1.1 - Finalize redo function --- src/Widgets/UI.vala | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/Widgets/UI.vala b/src/Widgets/UI.vala index 82e41e6..72bf80b 100644 --- a/src/Widgets/UI.vala +++ b/src/Widgets/UI.vala @@ -333,15 +333,12 @@ namespace DotMatrix { public void redo () { if (history_paths != null) { unowned List h_last = history_paths.last (); + unowned List 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; } } }