Skip to content

Commit 36d9b36

Browse files
committed
Updating timeline changed callback to always reset the current value of ENABLE_PLAYBACK_CACHING. For example, sometimes we have already disabled this setting before changing the timeline data - and we would like it to stay disabled until further notice. This method was accidentally re-enabling the caching when we were not expecting it to.
1 parent 788266e commit 36d9b36

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/classes/timeline.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ def changed(self, action):
7979
return
8080

8181
# Disable video caching temporarily
82+
caching_value = openshot.Settings.Instance().ENABLE_PLAYBACK_CACHING
8283
openshot.Settings.Instance().ENABLE_PLAYBACK_CACHING = False
8384

8485
try:
@@ -111,8 +112,8 @@ def changed(self, action):
111112
log.info("Error applying JSON to timeline object in libopenshot: %s. %s" %
112113
(e, action.json(is_array=True)))
113114

114-
# Enable video caching
115-
openshot.Settings.Instance().ENABLE_PLAYBACK_CACHING = True
115+
# Resume video caching original value
116+
openshot.Settings.Instance().ENABLE_PLAYBACK_CACHING = caching_value
116117

117118
def MaxSizeChangedCB(self, new_size):
118119
"""Callback for max sized change (i.e. max size of video widget)"""

0 commit comments

Comments
 (0)