Skip to content

Commit

Permalink
Disable timeline when rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
rodlie committed Aug 1, 2024
1 parent 970c151 commit ad965cb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app/GUI/RenderWidgets/renderwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "videoencoder.h"
#include "themesupport.h"
#include "../mainwindow.h"
#include "../timelinedockwidget.h"

RenderWidget::RenderWidget(QWidget *parent)
: QWidget(parent)
Expand Down Expand Up @@ -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) {
Expand Down
5 changes: 5 additions & 0 deletions src/app/GUI/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2153,6 +2153,11 @@ LayoutHandler *MainWindow::getLayoutHandler()
return mLayoutHandler;
}

TimelineDockWidget *MainWindow::getTimeLineWidget()
{
return mTimeline;
}

stdsptr<void> MainWindow::lock()
{
if (mLock) { return mLock->ref<Lock>(); }
Expand Down
1 change: 1 addition & 0 deletions src/app/GUI/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ class MainWindow : public QMainWindow
void openRendererWindow();
void cmdAddAction(QAction *act);
LayoutHandler* getLayoutHandler();
TimelineDockWidget* getTimeLineWidget();

protected:
void lockFinished();
Expand Down

0 comments on commit ad965cb

Please sign in to comment.