Skip to content

Commit 01e4467

Browse files
committed
main_win: Drop thumbnail code, expand bare logs
1 parent 824b381 commit 01e4467

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

src/windows/main_window.py

+7-15
Original file line numberDiff line numberDiff line change
@@ -395,20 +395,13 @@ def actionEditTitle_trigger(self, event):
395395
file = File.get(id=selected_file_id)
396396
file_path = file.data.get("path")
397397

398-
# Delete thumbnail for this file (it will be recreated soon)
399-
thumb_path = os.path.join(info.THUMBNAIL_PATH, "{}.png".format(file.id))
400-
401-
# Check if thumb exists (and delete it)
402-
if os.path.exists(thumb_path):
403-
os.remove(thumb_path)
404-
405398
# show dialog for editing title
406399
from windows.title_editor import TitleEditor
407400
win = TitleEditor(file_path)
408401
# Run the dialog event loop - blocking interaction on this window during that time
409402
result = win.exec_()
410403

411-
# Force update of files model (which will rebuild missing thumbnails)
404+
# Force update of files model (which will rebuild thumbnails)
412405
get_app().window.filesTreeView.refresh_view()
413406

414407
# Force update of clips
@@ -919,7 +912,7 @@ def actionPreview_File_trigger(self, event):
919912

920913
# Bail out if no file selected
921914
if not f:
922-
log.info(self.selected_files)
915+
log.info("Preview action failed, selected files: {}".format(self.selected_files))
923916
return
924917

925918
# show dialog
@@ -1205,7 +1198,6 @@ def actionArrowTool_trigger(self, event):
12051198

12061199
def actionSnappingTool_trigger(self, event):
12071200
log.info("actionSnappingTool_trigger")
1208-
log.info(self.actionSnappingTool.isChecked())
12091201

12101202
# Enable / Disable snapping mode
12111203
self.timeline.SetSnappingMode(self.actionSnappingTool.isChecked())
@@ -1289,7 +1281,6 @@ def actionPreviousMarker_trigger(self, event):
12891281

12901282
def actionNextMarker_trigger(self, event):
12911283
log.info("actionNextMarker_trigger")
1292-
log.info(self.preview_thread.current_frame)
12931284

12941285
# Calculate current position (in seconds)
12951286
fps = get_app().project.get("fps")
@@ -1432,7 +1423,7 @@ def keyPressEvent(self, event):
14321423
self.actionRemoveClip.trigger()
14331424
self.actionRemoveTransition.trigger()
14341425

1435-
# Boiler plate key mappings (mostly for menu support on Ubuntu/Unity)
1426+
# Menu shortcuts
14361427
elif key.matches(self.getShortcutByName("actionNew")) == QKeySequence.ExactMatch:
14371428
self.actionNew.trigger()
14381429
elif key.matches(self.getShortcutByName("actionOpen")) == QKeySequence.ExactMatch:
@@ -1552,8 +1543,9 @@ def keyPressEvent(self, event):
15521543
elif key.matches(self.getShortcutByName("selectNone")) == QKeySequence.ExactMatch:
15531544
self.timeline.ClearAllSelections()
15541545

1555-
# Bubble event on
1556-
event.ignore()
1546+
# If we didn't act on the event, forward it to the base class
1547+
else:
1548+
super(MainWindow, self).keyPressEvent(event)
15571549

15581550

15591551
def actionProfile_trigger(self, event):
@@ -1577,7 +1569,7 @@ def actionSplitClip_trigger(self, event):
15771569

15781570
# Bail out if no file selected
15791571
if not f:
1580-
log.info(self.selected_files)
1572+
log.warn("Split clip action failed, selected files: {}".format(self.selected_files))
15811573
return
15821574

15831575
# show dialog

0 commit comments

Comments
 (0)