mirror of https://github.com/odrling/Aegisub
Eliminate a pointless menu refresh when opening subtitle files
This commit is contained in:
parent
acb9b8adac
commit
0416188235
|
@ -360,10 +360,12 @@ namespace Automation4 {
|
||||||
|
|
||||||
void LocalScriptManager::Reload()
|
void LocalScriptManager::Reload()
|
||||||
{
|
{
|
||||||
|
bool was_empty = scripts.empty();
|
||||||
scripts.clear();
|
scripts.clear();
|
||||||
|
|
||||||
auto const& local_scripts = context->ass->Properties.automation_scripts;
|
auto const& local_scripts = context->ass->Properties.automation_scripts;
|
||||||
if (local_scripts.empty()) {
|
if (local_scripts.empty()) {
|
||||||
|
if (!was_empty)
|
||||||
ScriptsChanged();
|
ScriptsChanged();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue