Skip to content

Commit

Permalink
Protecting timeline webview from unrelated changes - which can someti…
Browse files Browse the repository at this point in the history
…mes happen prior to the webview being fully loaded (causing a freeze on launch of OpenShot)
  • Loading branch information
jonoomph committed Apr 18, 2023
1 parent 967a429 commit 91b19e5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/windows/views/webview.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,11 @@ def changed(self, action):
log.error("Error duplicating UpdateAction", exc_info=1)
return

# Bail out if change unrelated to webview
if action.key and action.key[0] not in ["clips", "effects"]:
log.debug(f"Skipping unneeded webview update for '{action.key[0]}'")
return

# Send a JSON version of the UpdateAction to the timeline webview method: applyJsonDiff()
if action.type == "load":
# Set thumbnail server
Expand Down

0 comments on commit 91b19e5

Please sign in to comment.