Skip to content

Commit

Permalink
Generate project ID correctly on new projects, and fix old default pr…
Browse files Browse the repository at this point in the history
…oject id's (which are 'T0')
  • Loading branch information
jonoomph committed May 17, 2019
1 parent 8b9a6b1 commit 74290d1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/classes/project_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,9 @@ def new(self):
self._data["channels"] = channels
self._data["channel_layout"] = channel_layout

# Set default project ID
self._data["id"] = self.generate_id()

def load(self, file_path, clear_thumbnails=True):
""" Load project from file """

Expand Down Expand Up @@ -741,6 +744,10 @@ def upgrade_project_data_structures(self):
point.get("handle_right")["X"] = 0.5
point.get("handle_right")["Y"] = 0.0

# Fix default project id (if found)
if self._data.get("id") == "T0":
self._data["id"] = self.generate_id()

def save(self, file_path, move_temp_files=True, make_paths_relative=True):
""" Save project file to disk """
import openshot
Expand Down

0 comments on commit 74290d1

Please sign in to comment.