slotAddGuide: use QPointer [krazy 12/37] by Mikko Rapeli

parent 614bbd2b
......@@ -5262,10 +5262,14 @@ void CustomTrackView::slotAddGuide(bool dialog)
{
CommentedTime marker(GenTime(m_cursorPos, m_document->fps()), i18n("Guide"));
if (dialog) {
MarkerDialog d(NULL, marker, m_document->timecode(), i18n("Add Guide"), this);
if (d.exec() != QDialog::Accepted) return;
marker = d.newMarker();
QPointer<MarkerDialog> d = new MarkerDialog(NULL, marker,
m_document->timecode(), i18n("Add Guide"), this);
if (d->exec() != QDialog::Accepted) {
delete d;
return;
}
marker = d->newMarker();
delete d;
} else {
marker.setComment(m_document->timecode().getDisplayTimecodeFromFrames(m_cursorPos, false));
}
......
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