From d91a9ffb62b9adcba4edda1f2d33e73aadd6695f Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Mardelle Date: Sat, 26 Jan 2013 15:16:16 +0100 Subject: [PATCH] Do not allow several clip properties dialog for one same clip --- src/mainwindow.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 24d3f1a3..cc8908ee 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -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 list = findChildren(); + 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); -- 2.39.2