Commit 2a5f94f1 authored by Thibault Saunier's avatar Thibault Saunier Committed by Alexandru Băluț

mainwindow: Do not purge clips when an asset is removed

That does not belong to the main window but to the media library
that have a much better knowledge of what is going on

Differential Revision:
parent 939eb1c2
......@@ -538,11 +538,6 @@ class PitiviMainWindow(Gtk.ApplicationWindow, Loggable):
def _mediaLibrarySourceRemovedCb(self, unused_project, asset):
"""When a clip is removed from the Media Library, tell the timeline
to remove all instances of that clip."""
def _builderConnectCb(self, builder, gobject, signal_name, handler_name,
connect_object, flags, user_data):
id_ = gobject.connect(signal_name, getattr(self, handler_name))
......@@ -1021,7 +1016,6 @@ class PitiviMainWindow(Gtk.ApplicationWindow, Loggable):
def _connectToProject(self, project):
# FIXME GES we should re-enable this when possible
# medialibrary.connect("missing-plugins", self._sourceListMissingPluginsCb)
project.connect("asset-removed", self._mediaLibrarySourceRemovedCb)
project.connect("project-changed", self._projectChangedCb)
"rendering-settings-changed", self._renderingSettingsChangedCb)
......@@ -1076,7 +1070,6 @@ class PitiviMainWindow(Gtk.ApplicationWindow, Loggable):
self.settings.lastProjectFolder = folder_path
def _disconnectFromProject(self, project):
......@@ -379,6 +379,8 @@ class MediaLibraryWidget(Gtk.Box, Loggable):
for row in rows:
asset = model[row.get_path()][COL_ASSET]
# The treeview can make some of the remaining items selected, so
......@@ -1231,13 +1231,13 @@ class TimelineContainer(Gtk.Grid, Zoomable, Loggable):
return self.bTimeline.props.duration
return position
def purgeObject(self, asset_id):
def purgeAsset(self, asset_id):
"""Remove all instances of an asset from the timeline."""
layers = self.bTimeline.get_layers()
for layer in layers:
for tlobj in layer.get_clips():
if asset_id == tlobj.get_id():
for clip in layer.get_clips():
if asset_id == clip.get_id():
def setProjectManager(self, projectmanager):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment