From ad965cbafd08837935f005005c6c78d2fb42c502 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole-Andr=C3=A9=20Rodlie?= Date: Thu, 1 Aug 2024 22:50:22 +0200 Subject: [PATCH] Disable timeline when rendering --- src/app/GUI/RenderWidgets/renderwidget.cpp | 5 +++++ src/app/GUI/mainwindow.cpp | 5 +++++ src/app/GUI/mainwindow.h | 1 + 3 files changed, 11 insertions(+) diff --git a/src/app/GUI/RenderWidgets/renderwidget.cpp b/src/app/GUI/RenderWidgets/renderwidget.cpp index 99e73248f..54b0dd666 100644 --- a/src/app/GUI/RenderWidgets/renderwidget.cpp +++ b/src/app/GUI/RenderWidgets/renderwidget.cpp @@ -33,6 +33,7 @@ #include "videoencoder.h" #include "themesupport.h" #include "../mainwindow.h" +#include "../timelinedockwidget.h" RenderWidget::RenderWidget(QWidget *parent) : QWidget(parent) @@ -218,6 +219,10 @@ void RenderWidget::handleRenderState(const RenderState &state) mStopRenderButton->setEnabled(!isIdle); mAddRenderButton->setEnabled(isIdle); mRenderProgressBar->setFormat(renderStateFormat); + + const auto timeline = MainWindow::sGetInstance()->getTimeLineWidget(); + if (timeline) { timeline->setEnabled(isIdle); } + emit renderStateChanged(renderStateFormat, mState); if (isIdle) { diff --git a/src/app/GUI/mainwindow.cpp b/src/app/GUI/mainwindow.cpp index e12ac15da..c59abbbea 100644 --- a/src/app/GUI/mainwindow.cpp +++ b/src/app/GUI/mainwindow.cpp @@ -2153,6 +2153,11 @@ LayoutHandler *MainWindow::getLayoutHandler() return mLayoutHandler; } +TimelineDockWidget *MainWindow::getTimeLineWidget() +{ + return mTimeline; +} + stdsptr MainWindow::lock() { if (mLock) { return mLock->ref(); } diff --git a/src/app/GUI/mainwindow.h b/src/app/GUI/mainwindow.h index 4570ac14e..e6fbb7ac5 100644 --- a/src/app/GUI/mainwindow.h +++ b/src/app/GUI/mainwindow.h @@ -194,6 +194,7 @@ class MainWindow : public QMainWindow void openRendererWindow(); void cmdAddAction(QAction *act); LayoutHandler* getLayoutHandler(); + TimelineDockWidget* getTimeLineWidget(); protected: void lockFinished();