[pitivi] clipproperties: Disconnect from the project when it's closed
- From: Alexandru Băluț <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] clipproperties: Disconnect from the project when it's closed
- Date: Tue, 13 Mar 2018 08:48:29 +0000 (UTC)
commit a9058c7498d56829517fd0046cba8c82bd2c7cff
Author: Harish Fulara <harish14143 iiitd ac in>
Date: Sun Mar 11 21:28:18 2018 +0530
clipproperties: Disconnect from the project when it's closed
When we open a new project via app menu, the current project gets closed
but its reference in TransformationProperties class is not set to None.
Closes #2171
pitivi/clipproperties.py | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/pitivi/clipproperties.py b/pitivi/clipproperties.py
index f18bbbad..3b9b9818 100644
--- a/pitivi/clipproperties.py
+++ b/pitivi/clipproperties.py
@@ -550,6 +550,8 @@ class TransformationProperties(Gtk.Expander, Loggable):
self.app.project_manager.connect_after(
"new-project-loaded", self._newProjectLoadedCb)
+ self.app.project_manager.connect_after(
+ "project-closed", self.__project_closed_cb)
def _newProjectLoadedCb(self, unused_app, project):
if self._selection is not None:
@@ -564,6 +566,9 @@ class TransformationProperties(Gtk.Expander, Loggable):
self._selection.connect('selection-changed', self._selectionChangedCb)
self._project.pipeline.connect("position", self._position_cb)
+ def __project_closed_cb(self, unused_project_manager, unused_project):
+ self._project = None
+
def _initButtons(self):
clear_button = self.builder.get_object("clear_button")
clear_button.connect("clicked", self._defaultValuesCb)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]