slotShowClipProperties: Use QPointer [krazy 28/37] by Mikko Rapeli

parent fa881607
...@@ -3330,11 +3330,12 @@ void MainWindow::slotApplyNewClipProperties(const QString id, QMap <QString, QSt ...@@ -3330,11 +3330,12 @@ void MainWindow::slotApplyNewClipProperties(const QString id, QMap <QString, QSt
void MainWindow::slotShowClipProperties(QList <DocClipBase *> cliplist, QMap<QString, QString> commonproperties) void MainWindow::slotShowClipProperties(QList <DocClipBase *> cliplist, QMap<QString, QString> commonproperties)
{ {
ClipProperties dia(cliplist, m_activeDocument->timecode(), commonproperties, this); QPointer<ClipProperties> dia = new ClipProperties(cliplist,
if (dia.exec() == QDialog::Accepted) { m_activeDocument->timecode(), commonproperties, this);
if (dia->exec() == QDialog::Accepted) {
QUndoCommand *command = new QUndoCommand(); QUndoCommand *command = new QUndoCommand();
command->setText(i18n("Edit clips")); command->setText(i18n("Edit clips"));
QMap <QString, QString> newImageProps = dia.properties(); QMap <QString, QString> newImageProps = dia->properties();
// Transparency setting applies only for images // Transparency setting applies only for images
QMap <QString, QString> newProps = newImageProps; QMap <QString, QString> newProps = newImageProps;
newProps.remove("transparency"); newProps.remove("transparency");
...@@ -3348,8 +3349,9 @@ void MainWindow::slotShowClipProperties(QList <DocClipBase *> cliplist, QMap<QSt ...@@ -3348,8 +3349,9 @@ void MainWindow::slotShowClipProperties(QList <DocClipBase *> cliplist, QMap<QSt
} }
m_activeDocument->commandStack()->push(command); m_activeDocument->commandStack()->push(command);
for (int i = 0; i < cliplist.count(); i++) for (int i = 0; i < cliplist.count(); i++)
m_activeTimeline->projectView()->slotUpdateClip(cliplist.at(i)->getId(), dia.needsTimelineReload()); m_activeTimeline->projectView()->slotUpdateClip(cliplist.at(i)->getId(), dia->needsTimelineReload());
} }
delete dia;
} }
void MainWindow::customEvent(QEvent* e) void MainWindow::customEvent(QEvent* e)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment