Commit f2bf7f16 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle

Merge branch 'work/usta_fix_null_calls'

parents 0430805f 153688e1
Pipeline #35553 passed with stage
in 23 minutes and 16 seconds
......@@ -2012,26 +2012,27 @@ void MainWindow::slotRenderProject()
{
KdenliveDoc *project = pCore->currentDoc();
if (!m_renderWidget) {
if (project) {
m_renderWidget = new RenderWidget(project->useProxy(), this);
connect(m_renderWidget, &RenderWidget::shutdown, this, &MainWindow::slotShutdown);
connect(m_renderWidget, &RenderWidget::selectedRenderProfile, this, &MainWindow::slotSetDocumentRenderProfile);
connect(m_renderWidget, &RenderWidget::abortProcess, this, &MainWindow::abortRenderJob);
connect(m_renderWidget, &RenderWidget::openDvdWizard, this, &MainWindow::slotDvdWizard);
connect(this, &MainWindow::updateRenderWidgetProfile, m_renderWidget, &RenderWidget::adjustViewToProfile);
m_renderWidget->setGuides(project->getGuideModel());
m_renderWidget->updateDocumentPath();
m_renderWidget->setRenderProfile(project->getRenderProperties());
}
if (m_compositeAction->currentAction()) {
m_renderWidget->errorMessage(RenderWidget::CompositeError, m_compositeAction->currentAction()->data().toInt() == 1
? i18n("Rendering using low quality track compositing")
: QString());
}
if ( !m_renderWidget && project ) {
m_renderWidget = new RenderWidget(project->useProxy(), this);
connect(m_renderWidget, &RenderWidget::shutdown, this, &MainWindow::slotShutdown);
connect(m_renderWidget, &RenderWidget::selectedRenderProfile, this, &MainWindow::slotSetDocumentRenderProfile);
connect(m_renderWidget, &RenderWidget::abortProcess, this, &MainWindow::abortRenderJob);
connect(m_renderWidget, &RenderWidget::openDvdWizard, this, &MainWindow::slotDvdWizard);
connect(this, &MainWindow::updateRenderWidgetProfile, m_renderWidget, &RenderWidget::adjustViewToProfile);
m_renderWidget->setGuides(project->getGuideModel());
m_renderWidget->updateDocumentPath();
m_renderWidget->setRenderProfile(project->getRenderProperties());
}
if ( m_renderWidget && m_compositeAction && m_compositeAction->currentAction() ) {
m_renderWidget->errorMessage(RenderWidget::CompositeError, m_compositeAction->currentAction()->data().toInt() == 1
? i18n("Rendering using low quality track compositing")
: QString());
}
slotCheckRenderStatus();
m_renderWidget->show();
if ( m_renderWidget ) {
m_renderWidget->show();
}
// m_renderWidget->showNormal();
// What are the following lines supposed to do?
......
......@@ -1624,8 +1624,10 @@ bool TimelineController::createSplitOverlay(int clipId, std::shared_ptr<Mlt::Fil
if (!m_timelinePreview) {
initializePreview();
}
m_timelinePreview->setOverlayTrack(overlay);
m_model->m_overlayTrackCount = m_timelinePreview->addedTracks();
if(m_timelinePreview){
m_timelinePreview->setOverlayTrack(overlay);
m_model->m_overlayTrackCount = m_timelinePreview->addedTracks();
}
return true;
}
......@@ -1808,15 +1810,20 @@ void TimelineController::loadPreview(const QString &chunks, const QString &dirty
for (const QString &frame : qAsConst(dirtyList)) {
dirtyChunks << frame.toInt();
}
m_disablePreview->blockSignals(true);
m_disablePreview->setChecked(enable);
m_disablePreview->blockSignals(false);
if (!enable) {
m_timelinePreview->buildPreviewTrack();
m_usePreview = true;
m_model->m_overlayTrackCount = m_timelinePreview->addedTracks();
if ( m_disablePreview ) {
m_disablePreview->blockSignals(true);
m_disablePreview->setChecked(enable);
m_disablePreview->blockSignals(false);
}
if ( m_timelinePreview ) {
if (!enable) {
m_timelinePreview->buildPreviewTrack();
m_usePreview = true;
m_model->m_overlayTrackCount = m_timelinePreview->addedTracks();
}
m_timelinePreview->loadChunks(renderedChunks, dirtyChunks, documentDate);
}
m_timelinePreview->loadChunks(renderedChunks, dirtyChunks, documentDate);
}
QMap<QString, QString> TimelineController::documentProperties()
......
......@@ -627,7 +627,7 @@ void GraphicsSceneRectMove::mouseReleaseEvent(QGraphicsSceneMouseEvent *e)
if (m_tool == TITLE_RECTANGLE && (m_selectedItem != nullptr)) {
setSelectedItem(m_selectedItem);
}
if (m_createdText) {
if (m_createdText && m_selectedItem) {
m_selectedItem->setSelected(true);
auto *newText = static_cast<MyTextItem *>(m_selectedItem);
QTextCursor cur(newText->document());
......
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