Compare commits
2 Commits
efa10bfce3
...
a6886a8ab8
Author | SHA1 | Date | |
---|---|---|---|
a6886a8ab8 | |||
4d4cba9876 |
@@ -481,11 +481,13 @@ class VideoEditor:
|
|||||||
|
|
||||||
def next_video(self):
|
def next_video(self):
|
||||||
"""Switch to the next video"""
|
"""Switch to the next video"""
|
||||||
|
self.save_state() # Save current video state before switching
|
||||||
next_index = (self.current_video_index + 1) % len(self.video_files)
|
next_index = (self.current_video_index + 1) % len(self.video_files)
|
||||||
self.switch_to_video(next_index)
|
self.switch_to_video(next_index)
|
||||||
|
|
||||||
def previous_video(self):
|
def previous_video(self):
|
||||||
"""Switch to the previous video"""
|
"""Switch to the previous video"""
|
||||||
|
self.save_state() # Save current video state before switching
|
||||||
prev_index = (self.current_video_index - 1) % len(self.video_files)
|
prev_index = (self.current_video_index - 1) % len(self.video_files)
|
||||||
self.switch_to_video(prev_index)
|
self.switch_to_video(prev_index)
|
||||||
|
|
||||||
@@ -774,13 +776,12 @@ class VideoEditor:
|
|||||||
if self.is_fullscreen:
|
if self.is_fullscreen:
|
||||||
# Switch to windowed mode
|
# Switch to windowed mode
|
||||||
self.is_fullscreen = False
|
self.is_fullscreen = False
|
||||||
cv2.namedWindow(window_title, cv2.WINDOW_NORMAL)
|
cv2.setWindowProperty(window_title, cv2.WND_PROP_FULLSCREEN, cv2.WINDOW_NORMAL)
|
||||||
cv2.resizeWindow(window_title, 1200, 800)
|
cv2.resizeWindow(window_title, 1200, 800)
|
||||||
print("Switched to windowed mode")
|
print("Switched to windowed mode")
|
||||||
else:
|
else:
|
||||||
# Switch to fullscreen mode - just maximize the window
|
# Switch to fullscreen mode
|
||||||
self.is_fullscreen = True
|
self.is_fullscreen = True
|
||||||
cv2.namedWindow(window_title, cv2.WINDOW_NORMAL)
|
|
||||||
cv2.setWindowProperty(window_title, cv2.WND_PROP_FULLSCREEN, cv2.WINDOW_FULLSCREEN)
|
cv2.setWindowProperty(window_title, cv2.WND_PROP_FULLSCREEN, cv2.WINDOW_FULLSCREEN)
|
||||||
print("Switched to fullscreen mode")
|
print("Switched to fullscreen mode")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user