[pitivi] medialibrary: Clear the selection after delete
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] medialibrary: Clear the selection after delete
- Date: Thu, 17 Dec 2015 10:02:22 +0000 (UTC)
commit 1b61195df2f1ab546ac91219eb2cb5148ce0d0c4
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Tue Nov 24 10:09:25 2015 +0100
medialibrary: Clear the selection after delete
Reviewed-by: Thibault Saunier <tsaunier gnome org>
Differential Revision: https://phabricator.freedesktop.org/D547
pitivi/medialibrary.py | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/medialibrary.py b/pitivi/medialibrary.py
index 7b1d567..89995c9 100644
--- a/pitivi/medialibrary.py
+++ b/pitivi/medialibrary.py
@@ -381,6 +381,10 @@ class MediaLibraryWidget(Gtk.Box, Loggable):
self.app.project_manager.current_project.remove_asset(asset)
self.app.action_log.commit()
+ # The treeview can make some of the remaining items selected, so
+ # make sure none are selected.
+ self._unselectAll()
+
def _insertEndCb(self, unused_action, unused_parameter):
self.app.gui.timeline_ui.insertAssets(self.getSelectedAssets(), -1)
@@ -842,9 +846,15 @@ class MediaLibraryWidget(Gtk.Box, Loggable):
if row[COL_URI] not in sources_uris:
if self.clip_view == SHOW_TREEVIEW:
selection.unselect_iter(row.iter)
- else:
+ elif self.clip_view == SHOW_ICONVIEW:
self.iconview.unselect_path(row.path)
+ def _unselectAll(self):
+ if self.clip_view == SHOW_TREEVIEW:
+ self.treeview.get_selection().unselect_all()
+ elif self.clip_view == SHOW_ICONVIEW:
+ self.iconview.unselect_all()
+
# UI callbacks
def __projectSettingsSetInfobarCb(self, infobar, response_id):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]