summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Baptiste Mardelle <jb@kdenlive.org>2016-09-15 19:27:27 (GMT)
committerJean-Baptiste Mardelle <jb@kdenlive.org>2016-09-15 19:27:27 (GMT)
commit322a21e5057664a10046965eea1057c7139c27cd (patch)
tree63e22dcba2ac486b5affa5fe0ee5935e7495cbcc
parentda3539c449be1c261f290c31f3f91d99277e90e7 (diff)
Add deselect option, patch by Harald Albrecht
REVIEW: 128923
-rw-r--r--src/kdenliveui.rc3
-rw-r--r--src/mainwindow.cpp12
-rw-r--r--src/mainwindow.h1
3 files changed, 15 insertions, 1 deletions
diff --git a/src/kdenliveui.rc b/src/kdenliveui.rc
index 7543d5d..5ffa0c9 100644
--- a/src/kdenliveui.rc
+++ b/src/kdenliveui.rc
@@ -1,5 +1,5 @@
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui name="kdenlive" version="146" translationDomain="kdenlive">
+<kpartgui name="kdenlive" version="147" translationDomain="kdenlive">
<MenuBar>
<Menu name="file" >
<Action name="dvd_wizard" />
@@ -36,6 +36,7 @@
<Separator />
<Action name="select_track" />
<Action name="select_all_tracks" />
+ <Action name="unselect_all_tracks" />
</Menu>
<Separator />
<Action name="bin_view_mode" />
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index a9b4c2f..112ac49 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -1404,6 +1404,11 @@ void MainWindow::setupActions()
selectAll->setShortcutContext(Qt::WidgetWithChildrenShortcut);
timelineActions->addAction(QStringLiteral("select_all_tracks"), selectAll);
+ QAction *unselectAll = KStandardAction::deselect(this, SLOT(slotUnselectAllTracks()), this);
+ unselectAll->setIcon(KoIconUtils::themedIcon(QStringLiteral("kdenlive-unselect-all")));
+ unselectAll->setShortcutContext(Qt::WidgetWithChildrenShortcut);
+ timelineActions->addAction(QStringLiteral("unselect_all_tracks"), unselectAll);
+
kdenliveCategoryMap.insert(QStringLiteral("timeline"), timelineActions);
// Cached data management
@@ -2359,6 +2364,13 @@ void MainWindow::slotSelectAllTracks()
pCore->projectManager()->currentTimeline()->projectView()->slotSelectAllClips();
}
+void MainWindow::slotUnselectAllTracks()
+{
+ pCore->monitorManager()->activateMonitor(Kdenlive::ProjectMonitor);
+ if (pCore->projectManager()->currentTimeline())
+ pCore->projectManager()->currentTimeline()->projectView()->clearSelection();
+}
+
void MainWindow::slotEditGuide(int pos, QString text)
{
if (pCore->projectManager()->currentTimeline())
diff --git a/src/mainwindow.h b/src/mainwindow.h
index 95629ae..2218015 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -379,6 +379,7 @@ private slots:
void slotSelectTrack();
/** @brief Select all clips in timeline. */
void slotSelectAllTracks();
+ void slotUnselectAllTracks();
void slotGetNewLumaStuff();
void slotGetNewTitleStuff();
void slotGetNewRenderStuff();