Skip to content

Commit

Permalink
webview: Check id before showing track menu (OpenShot#4758)
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdnyc authored Apr 3, 2022
1 parent e52f9c1 commit 2ee9307
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/windows/views/webview.py
Original file line number Diff line number Diff line change
Expand Up @@ -2629,13 +2629,16 @@ def ShowTransitionMenu(self, tran_id=None):

@pyqtSlot(str)
def ShowTrackMenu(self, layer_id=None):
log.info('ShowTrackMenu: %s' % layer_id)
log.info('ShowTrackMenu: %s', layer_id)

# Get track object
track = Track.get(id=layer_id)
if not track:
return

if layer_id not in self.window.selected_tracks:
self.window.selected_tracks = [layer_id]

# Get track object
track = Track.get(id=layer_id)
locked = track.data.get("lock", False)

menu = QMenu(self)
Expand Down

0 comments on commit 2ee9307

Please sign in to comment.