Eliminate a pointless menu refresh when opening subtitle files

This commit is contained in:
Thomas Goyne 2014-12-11 08:19:05 -08:00
parent acb9b8adac
commit 0416188235
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}