[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdenlive] src/bin: Fix crash in ptoject bin when switching from icon to tree view
From: Jean-Baptiste Mardelle <jb () kdenlive ! org>
Date: 2015-09-30 19:15:18
Message-ID: E1ZhMqU-0002QZ-LM () scm ! kde ! org
[Download RAW message or body]
Git commit 616b50d4972c0b7f05a171e39a9e6b622d8a6369 by Jean-Baptiste Mardelle.
Committed on 30/09/2015 at 19:13.
Pushed by mardelle into branch 'master'.
Fix crash in ptoject bin when switching from icon to tree view
M +4 -1 src/bin/bin.cpp
http://commits.kde.org/kdenlive/616b50d4972c0b7f05a171e39a9e6b622d8a6369
diff --git a/src/bin/bin.cpp b/src/bin/bin.cpp
index 6610507..ac29761 100644
--- a/src/bin/bin.cpp
+++ b/src/bin/bin.cpp
@@ -1097,6 +1097,7 @@ QList <ProjectClip *> Bin::selectedClips()
void Bin::slotInitView(QAction *action)
{
if (action) {
+ m_proxyModel->selectionModel()->clearSelection();
int viewType = action->data().toInt();
KdenliveSettings::setBinMode(viewType);
if (viewType == m_listType) {
@@ -1112,13 +1113,15 @@ void Bin::slotInitView(QAction *action)
else {
// remove the current folderUp item if any
if (m_folderUp) {
+ if (m_folderUp->parent()) {
+ m_folderUp->parent()->removeChild(m_folderUp);
+ }
delete m_folderUp;
m_folderUp = NULL;
}
}
m_listType = static_cast<BinViewType>(viewType);
}
- m_proxyModel->selectionModel()->clearSelection();
if (m_itemView) {
delete m_itemView;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic