From 986b9c74cad7879ff7a3a5a0a5904ae66d37bc3d Mon Sep 17 00:00:00 2001 From: Chris Cranford Date: Sat, 10 Aug 2024 18:35:40 -0400 Subject: [PATCH] GH-696 Avoid error when disabling recent files option --- src/editor/editor_panel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editor/editor_panel.cpp b/src/editor/editor_panel.cpp index e8d3b29f..c34fdda7 100644 --- a/src/editor/editor_panel.cpp +++ b/src/editor/editor_panel.cpp @@ -284,7 +284,7 @@ void OrchestratorEditorPanel::_update_recent_history() _recent_history->add_item("Clear Recent Files"); if (_recent_files.is_empty()) - _recent_history->set_item_disabled(_recent_history->get_item_count(), true); + _recent_history->set_item_disabled(_recent_history->get_item_count() - 1, true); } void OrchestratorEditorPanel::_save_recent_history()