[pitivi] mainwindow: Handle cancelling choosing a project to load with no fallback
- From: Jean-François Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] mainwindow: Handle cancelling choosing a project to load with no fallback
- Date: Sun, 29 Sep 2013 19:15:15 +0000 (UTC)
commit e9cc5858d8bf00f930133cff878cd960660097cd
Author: Jean-François Fortin Tam <nekohayo gmail com>
Date: Sun Sep 29 14:30:13 2013 -0400
mainwindow: Handle cancelling choosing a project to load with no fallback
This fixes the scenario where you have no unsaved changes, Ctrl+O to choose
a project to load, then cancel the file chooser and then try to import clips;
it would fail because we didn't properly reset to a blank project instance.
pitivi/mainwindow.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/mainwindow.py b/pitivi/mainwindow.py
index fa9ebf8..1f018bc 100644
--- a/pitivi/mainwindow.py
+++ b/pitivi/mainwindow.py
@@ -781,6 +781,9 @@ class PitiviMainWindow(Gtk.Window, Loggable):
response = chooser.run()
if response == Gtk.ResponseType.OK:
self.app.projectManager.loadProject(chooser.get_uri())
+ else:
+ self.info("User cancelled loading a new project, but no other project is currently active.
Resetting")
+ self.app.projectManager.newBlankProject()
chooser.destroy()
return True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]