From 04161882357f128919f241d3a7d94c28e954e09a Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Thu, 11 Dec 2014 08:19:05 -0800 Subject: [PATCH] Eliminate a pointless menu refresh when opening subtitle files --- src/auto4_base.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/auto4_base.cpp b/src/auto4_base.cpp index 649f04692..a890a6e57 100644 --- a/src/auto4_base.cpp +++ b/src/auto4_base.cpp @@ -360,11 +360,13 @@ namespace Automation4 { void LocalScriptManager::Reload() { + bool was_empty = scripts.empty(); scripts.clear(); auto const& local_scripts = context->ass->Properties.automation_scripts; if (local_scripts.empty()) { - ScriptsChanged(); + if (!was_empty) + ScriptsChanged(); return; }