]> git.sesse.net Git - kdenlive/commitdiff
Do not allow several clip properties dialog for one same clip
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Sat, 26 Jan 2013 14:16:16 +0000 (15:16 +0100)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Sat, 26 Jan 2013 14:16:16 +0000 (15:16 +0100)
src/mainwindow.cpp

index 24d3f1a3fdc2c7fa61ed4ae3221ff3c040aaf53b..cc8908ee2b9b25df5e22532242ebfb91d19041d2 100644 (file)
@@ -3362,6 +3362,16 @@ void MainWindow::slotShowClipProperties(DocClipBase *clip)
         //m_activeDocument->editTextClip(clip->getProperty("xml"), clip->getId());
         return;
     }
+    
+    // Check if we already have a properties dialog opened for that clip
+    QList <ClipProperties *> list = findChildren<ClipProperties *>();
+    for (int i = 0; i < list.size(); ++i) {
+        if (list.at(i)->clipId() == clip->getId()) {
+           // We have one dialog, show it
+           list.at(i)->raise();
+           return;
+       }
+    }
 
     // any type of clip but a title
     ClipProperties *dia = new ClipProperties(clip, m_activeDocument->timecode(), m_activeDocument->fps(), this);