From 45c9c1796c386dcec9f0afe4bbabd99f37b390c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Wed, 3 Jul 2024 11:39:28 +0200 Subject: [PATCH] [components] ScriptEditor: Fix reset of the history index --- meshroom/ui/components/scriptEditor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/ui/components/scriptEditor.py b/meshroom/ui/components/scriptEditor.py index b01fc1bf..a8326080 100644 --- a/meshroom/ui/components/scriptEditor.py +++ b/meshroom/ui/components/scriptEditor.py @@ -27,9 +27,9 @@ class ScriptEditorManager(QObject): result = stdout.getvalue().strip() - # Add the script to the history and move up the index + # Add the script to the history and move up the index to the top of history stack self._history.append(script) - self._index = self._index + 1 + self._index = len(self._history) return result