@@ -1183,11 +1183,11 @@ def Layout_Triggered(self, action, clip_ids):
1183
1183
clip .data ["location_x" ] = {"Points" : [p_object ]}
1184
1184
clip .data ["location_y" ] = {"Points" : [p_object ]}
1185
1185
1186
- if action == MENU_LAYOUT_CENTER or \
1187
- action == MENU_LAYOUT_TOP_LEFT or \
1188
- action == MENU_LAYOUT_TOP_RIGHT or \
1189
- action == MENU_LAYOUT_BOTTOM_LEFT or \
1190
- action == MENU_LAYOUT_BOTTOM_RIGHT :
1186
+ if action in [ MENU_LAYOUT_CENTER ,
1187
+ MENU_LAYOUT_TOP_LEFT ,
1188
+ MENU_LAYOUT_TOP_RIGHT ,
1189
+ MENU_LAYOUT_BOTTOM_LEFT ,
1190
+ MENU_LAYOUT_BOTTOM_RIGHT ] :
1191
1191
# Reset scale mode
1192
1192
clip .data ["scale" ] = openshot .SCALE_FIT
1193
1193
clip .data ["gravity" ] = new_gravity
@@ -1437,7 +1437,7 @@ def Copy_Triggered(self, action, clip_ids, tran_ids):
1437
1437
1438
1438
self .copy_clipboard [clip_id ] = {}
1439
1439
1440
- if action == MENU_COPY_CLIP or action == MENU_COPY_ALL :
1440
+ if action in [ MENU_COPY_CLIP , MENU_COPY_ALL ] :
1441
1441
self .copy_clipboard [clip_id ] = clip .data
1442
1442
elif action == MENU_COPY_KEYFRAMES_ALL :
1443
1443
self .copy_clipboard [clip_id ]['alpha' ] = clip .data ['alpha' ]
@@ -1480,7 +1480,7 @@ def Copy_Triggered(self, action, clip_ids, tran_ids):
1480
1480
1481
1481
self .copy_transition_clipboard [tran_id ] = {}
1482
1482
1483
- if action == MENU_COPY_TRANSITION or action == MENU_COPY_ALL :
1483
+ if action in [ MENU_COPY_TRANSITION , MENU_COPY_ALL ] :
1484
1484
self .copy_transition_clipboard [tran_id ] = tran .data
1485
1485
elif action == MENU_COPY_KEYFRAMES_ALL :
1486
1486
self .copy_transition_clipboard [tran_id ]['brightness' ] = tran .data ['brightness' ]
@@ -1891,7 +1891,7 @@ def Slice_Triggered(self, action, clip_ids, trans_ids, playhead_position=0):
1891
1891
# Determine if waveform needs to be redrawn
1892
1892
has_audio_data = clip_id in self .waveform_cache
1893
1893
1894
- if action == MENU_SLICE_KEEP_LEFT or action == MENU_SLICE_KEEP_BOTH :
1894
+ if action in [ MENU_SLICE_KEEP_LEFT , MENU_SLICE_KEEP_BOTH ] :
1895
1895
# Get details of original clip
1896
1896
position_of_clip = float (clip .data ["position" ])
1897
1897
start_of_clip = float (clip .data ["start" ])
@@ -1954,7 +1954,7 @@ def Slice_Triggered(self, action, clip_ids, trans_ids, playhead_position=0):
1954
1954
# Invalid transition, skip to next item
1955
1955
continue
1956
1956
1957
- if action == MENU_SLICE_KEEP_LEFT or action == MENU_SLICE_KEEP_BOTH :
1957
+ if action in [ MENU_SLICE_KEEP_LEFT , MENU_SLICE_KEEP_BOTH ] :
1958
1958
# Get details of original transition
1959
1959
position_of_tran = float (trans .data ["position" ])
1960
1960
0 commit comments