Skip to content

Commit

Permalink
Disable image sequences and error messages when dragging OS files ont…
Browse files Browse the repository at this point in the history
…o the timeline directly. For these dialogs, you must drag/import files into Project Files first.
  • Loading branch information
jonoomph committed Oct 7, 2024
1 parent af436da commit b77c12c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/windows/models/files_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,9 +483,8 @@ def get_image_sequence_details(self, file_path):
}
return parameters

def process_urls(self, qurl_list):
def process_urls(self, qurl_list, import_quietly=False, prevent_image_seq=False):
"""Recursively process QUrls from a QDropEvent"""
import_quietly = False
media_paths = []

# Transaction
Expand Down Expand Up @@ -516,7 +515,7 @@ def process_urls(self, qurl_list):
# Import all new media files
media_paths.sort()
log.debug("Importing file list: {}".format(media_paths))
self.add_files(media_paths, quiet=import_quietly)
self.add_files(media_paths, quiet=import_quietly, prevent_image_seq=prevent_image_seq)
get_app().updates.transaction_id = None

def update_file_thumbnail(self, file_id):
Expand Down
2 changes: 1 addition & 1 deletion src/windows/views/timeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -3022,7 +3022,7 @@ def dragEnterEvent(self, event):
urls = event.mimeData().urls()

# Import list of files
get_app().window.files_model.process_urls(urls)
get_app().window.files_model.process_urls(urls, import_quietly=True, prevent_image_seq=True)

# Get File objects and add JSON data
for uri in urls:
Expand Down

0 comments on commit b77c12c

Please sign in to comment.