]> git.sesse.net Git - kdenlive/commitdiff
Be more careful when closing a document, may solve some of the crashes reported in...
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Sat, 18 Oct 2008 22:58:34 +0000 (22:58 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Sat, 18 Oct 2008 22:58:34 +0000 (22:58 +0000)
http://www.kdenlive.org:80/mantis/view.php?id=221

svn path=/branches/KDE4/; revision=2486

src/clipitem.cpp
src/effectstackview.cpp
src/mainwindow.cpp
src/projectlist.cpp

index bbf7540cf3219943871f1a2b84835384863a6139..107e08bd9f4a14cfe64a3331641c37bb6615755d 100644 (file)
@@ -609,11 +609,9 @@ void ClipItem::paint(QPainter *painter,
 
     // draw transition handles on hover
     if (m_hover && itemWidth * scale > 40) {
-        QPainterPath transitionHandle;
-        const int handle_size = 4;
         QPointF p1 = painter->matrix().map(QPointF(0, itemHeight / 2)) + QPointF(10, 0);
         painter->drawPixmap(p1, projectScene()->m_transitionPixmap);
-        p1 = painter->matrix().map(QPointF(itemWidth, itemHeight / 2)) - QPointF(10 + handle_size * 3, 0);
+        p1 = painter->matrix().map(QPointF(itemWidth, itemHeight / 2)) - QPointF(22, 0);
         painter->drawPixmap(p1, projectScene()->m_transitionPixmap);
     }
 
@@ -718,7 +716,6 @@ QList <CommentedTime> ClipItem::commentedSnapMarkers() const {
 }
 
 void ClipItem::slotPrepareAudioThumb(double pixelForOneFrame, int startpixel, int endpixel, int channels) {
-
     QRectF re =  sceneBoundingRect();
     if (m_clipType == AV) re.setTop(re.y() + re.height() / 2);
 
index b643085b87e4e87d97e37c3c528fb22087649b29..96378e8939e5fc3e8c0648045bae7abfe00bc836 100644 (file)
@@ -264,6 +264,7 @@ void EffectStackView::clear() {
     ui.buttonReset->setEnabled(false);
     ui.buttonUp->setEnabled(false);
     ui.buttonDown->setEnabled(false);
+    effectedit->transferParamDesc(QDomElement(), 0, 0);
 }
 
 #include "effectstackview.moc"
index 8dae24073741c0b048c295c41660f6ee41fb2643..2231b2cc759c68d5694486bdcc25b133ecbb6cd8 100644 (file)
@@ -895,7 +895,11 @@ void MainWindow::closeCurrentDocument() {
     if (m_timelineArea->count() == 1) m_timelineArea->setTabBarHidden(true);
     delete docToClose;
     delete w;
-    if (m_timelineArea->count() == 0) m_activeDocument = NULL;
+    if (m_timelineArea->count() == 0) {
+        m_activeDocument = NULL;
+        effectStack->clear();
+        transitionConfig->slotTransitionItemSelected(NULL);
+    }
 }
 
 void MainWindow::saveFileAs(const QString &outputFileName) {
index d8d30f911f25632df6a555379a7ea0447562f1bf..a364ceb066c21fc35db51c358d67b5da9a8fb9d5 100644 (file)
@@ -511,12 +511,12 @@ void ProjectList::slotAddTitleClip() {
 }
 
 void ProjectList::setDocument(KdenliveDoc *doc) {
+    listView->blockSignals(true);
     listView->clear();
     m_thumbnailQueue.clear();
     m_infoQueue.clear();
     m_refreshed = false;
     QList <DocClipBase*> list = doc->clipManager()->documentClipList();
-    listView->blockSignals(true);
     for (int i = 0; i < list.count(); i++) {
         slotAddClip(list.at(i), false);
     }