Skip to content

Commit

Permalink
Merge branch 'develop' into blender-2.8-support
Browse files Browse the repository at this point in the history
  • Loading branch information
jonoomph committed Aug 2, 2019
2 parents d48ae1b + 4dbf589 commit e945479
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
19 changes: 6 additions & 13 deletions src/classes/project_data.py
Expand Up @@ -49,10 +49,6 @@ def __init__(self):
self.data_type = "project data" # Used in error messages
self.default_project_filepath = os.path.join(info.PATH, 'settings', '_default.project')

# Always set, in case the user creates the file mid-session
if info.USER_DEFAULT_PROJECT:
self.user_project_filepath = info.USER_DEFAULT_PROJECT

# Set default filepath to user's home folder
self.current_filepath = None

Expand Down Expand Up @@ -257,20 +253,17 @@ def new(self):
import openshot

# Try to load user default project
if os.path.exists(self.user_project_filepath):
if os.path.exists(info.USER_DEFAULT_PROJECT):
try:
self._data = self.read_from_file(self.user_project_filepath)
self._data = self.read_from_file(info.USER_DEFAULT_PROJECT)
except (FileNotFoundError, PermissionError) as ex:
log.warning("Unable to load defaults from {}: {}".format(
new_project_file, ex))
log.warning("Unable to load user project defaults from {}: {}".format(info.USER_DEFAULT_PROJECT, ex))
except Exception:
raise
else:
log.info("Loaded user project defaults from {}".format(
self.user_project_filepath))

# Fall back to OpenShot defaults, if user defaults didn't load
if not self._data:
log.info("Loaded user project defaults from {}".format(info.USER_DEFAULT_PROJECT))
else:
# Fall back to OpenShot defaults, if user defaults didn't load
self._data = self.read_from_file(self.default_project_filepath)

self.current_filepath = None
Expand Down
6 changes: 6 additions & 0 deletions src/windows/main_window.py
Expand Up @@ -754,6 +754,9 @@ def actionPreferences_trigger(self, event):
ui_util.setup_icon(self, self.actionPlay, "actionPlay", "media-playback-start")
self.actionPlay.setChecked(False)

# Set cursor to waiting
get_app().setOverrideCursor(QCursor(Qt.WaitCursor))

# Show dialog
from windows.preferences import Preferences
win = Preferences()
Expand All @@ -768,6 +771,9 @@ def actionPreferences_trigger(self, event):
s = settings.get_settings()
s.save()

# Restore normal cursor
get_app().restoreOverrideCursor()

def actionFilesShowAll_trigger(self, event):
self.filesTreeView.refresh_view()

Expand Down
3 changes: 3 additions & 0 deletions src/windows/preferences.py
Expand Up @@ -90,6 +90,9 @@ def __init__(self):
# Populate preferences
self.Populate()

# Restore normal cursor
get_app().restoreOverrideCursor()

def txtSearch_changed(self):
"""textChanged event handler for search box"""
log.info("Search for %s" % self.txtSearch.text())
Expand Down

0 comments on commit e945479

Please sign in to comment.