File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -1143,14 +1143,15 @@ def delayed_resize_callback(self):
1143
1143
project_size = QSize (get_app ().project .get ("width" ), get_app ().project .get ("height" ))
1144
1144
project_size .scale (self .delayed_size , Qt .KeepAspectRatio )
1145
1145
1146
- # Calculate height/width divisible by 2 (if valid height)
1147
1146
if project_size .height () > 0 :
1147
+ # Ensure width and height are divisible by 2
1148
1148
ratio = float (project_size .width ()) / float (project_size .height ())
1149
- width = round (project_size .width () / 2.0 ) * 2
1150
- height = (round (width / ratio ) / 2.0 ) * 2
1149
+ even_width = round (project_size .width () / 2.0 ) * 2
1150
+ even_height = round (round (even_width / ratio ) / 2.0 ) * 2
1151
+ project_size = QSize (even_width , even_height )
1151
1152
1152
- # Emit signal that video widget changed size
1153
- self .win .MaxSizeChanged .emit (project_size )
1153
+ # Emit signal that video widget changed size
1154
+ self .win .MaxSizeChanged .emit (project_size )
1154
1155
1155
1156
# Capture wheel event to alter zoom/scale of widget
1156
1157
def wheelEvent (self , event ):
You can’t perform that action at this time.
0 commit comments