]> git.sesse.net Git - kdenlive/commitdiff
Fix crash when dropping effect on a group
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 1 Apr 2012 10:14:47 +0000 (12:14 +0200)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 1 Apr 2012 10:14:47 +0000 (12:14 +0200)
src/commands/moveeffectcommand.cpp
src/effectstack/collapsiblegroup.cpp
src/effectstack/effectstackview2.cpp

index ba87dc3ddcb54ef9a25066f49376606a0f6de10d..6600bde780d730c01653baba5abeb87af7fa284e 100644 (file)
@@ -48,6 +48,7 @@ int MoveEffectCommand::id() const
 // virtual
 bool MoveEffectCommand::mergeWith(const QUndoCommand * other)
 {
+    return false;
     if (other->id() != id()) return false;
     if (m_track != static_cast<const MoveEffectCommand*>(other)->m_track) return false;
     if (m_pos != static_cast<const MoveEffectCommand*>(other)->m_pos) return false;
index 30684c26de2d3d84b575ac90316af1f4f7d7fae2..941251ac7d303c65c2afad0229e5cfdbb1336020 100644 (file)
@@ -288,7 +288,6 @@ void CollapsibleGroup::dragLeaveEvent(QDragLeaveEvent */*event*/)
 
 void CollapsibleGroup::dropEvent(QDropEvent *event)
 {
-    QMutexLocker lock(&m_mutex);
     framegroup->setProperty("active", false);
     framegroup->setStyleSheet(framegroup->styleSheet());
     const QString effects = QString::fromUtf8(event->mimeData()->data("kdenlive/effectslist"));
@@ -306,7 +305,7 @@ void CollapsibleGroup::dropEvent(QDropEvent *event)
        return;
     }
     if (m_subWidgets.isEmpty()) return;
-    int new_index = m_subWidgets.at(m_subWidgets.count() - 1)->effectIndex();
+    int new_index = m_subWidgets.last()->effectIndex();
     emit moveEffect(ix, new_index, m_index, m_title->text());
     event->setDropAction(Qt::MoveAction);
     event->accept();
index 687bac49cc7c82ec91afd5908e63977806fd971f..2c379dd15798525d75794efa47ff154ecb5aca18 100644 (file)
@@ -665,7 +665,6 @@ void EffectStackView2::slotMoveEffect(int currentIndex, int newIndex, int groupI
     } else {
        emit updateEffect(m_clipref, -1, oldeffect, neweffect, effectToMove->effectIndex(),false);
     }
-    
     //if (currentIndex == newIndex) return;
     // Update effect index with new position
     if (m_effectMetaInfo.trackMode) {