From 4baf8da6cd0427c847f1ff622b65d5d316bb142e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole-Andr=C3=A9=20Rodlie?= Date: Sun, 19 Nov 2023 16:23:53 +0100 Subject: [PATCH] Remove progress bar in status bar Was buggy on Windows. --- src/app/GUI/mainwindow.cpp | 24 ------------------------ src/app/GUI/mainwindow.h | 5 ----- 2 files changed, 29 deletions(-) diff --git a/src/app/GUI/mainwindow.cpp b/src/app/GUI/mainwindow.cpp index d3528e97d..c65714b1c 100755 --- a/src/app/GUI/mainwindow.cpp +++ b/src/app/GUI/mainwindow.cpp @@ -143,7 +143,6 @@ MainWindow::MainWindow(Document& document, , mTimelineWindowAct(nullptr) , mRenderWindow(nullptr) , mRenderWindowAct(nullptr) - , mRenderProgress(nullptr) { Q_ASSERT(!sInstance); sInstance = this; @@ -233,11 +232,6 @@ MainWindow::MainWindow(Document& document, this); mRenderWidget = new RenderWidget(this); - connect(mRenderWidget, &RenderWidget::progress, - this, &MainWindow::handleRenderProgress); - connect(mRenderWidget, &RenderWidget::rendererFinished, - this, &MainWindow::handleRenderFinished); - const auto alignWidget = new AlignWidget(this); alignWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); connect(alignWidget, &AlignWidget::alignTriggered, @@ -306,12 +300,6 @@ MainWindow::MainWindow(Document& document, installEventFilter(this); - mRenderProgress = new QProgressBar(this); - mRenderProgress->setFormat(tr("Render %p%")); - mRenderProgress->setMaximumWidth(300); - mRenderProgress->setVisible(false); - statusBar()->addPermanentWidget(mRenderProgress); - connect(&mAudioHandler, &AudioHandler::deviceChanged, this, [this]() { statusBar()->showMessage(tr("Changed audio output: %1") .arg(mAudioHandler.getDeviceName()), @@ -1344,18 +1332,6 @@ void MainWindow::openRenderQueueWindow(const bool &focus) mRenderWindow->focusWindow(); } -void MainWindow::handleRenderProgress(int frame, int total) -{ - if (!mRenderProgress->isVisible()) { mRenderProgress->setVisible(true); } - mRenderProgress->setRange(0, total); - mRenderProgress->setValue(frame); -} - -void MainWindow::handleRenderFinished() -{ - mRenderProgress->setVisible(false); -} - void MainWindow::openWelcomeDialog() { mStackWidget->setCurrentIndex(mStackIndexWelcome); diff --git a/src/app/GUI/mainwindow.h b/src/app/GUI/mainwindow.h index da782b469..e1c46516c 100755 --- a/src/app/GUI/mainwindow.h +++ b/src/app/GUI/mainwindow.h @@ -37,7 +37,6 @@ #include #include #include -#include #include "undoredo.h" #include "Private/Tasks/taskscheduler.h" @@ -400,10 +399,6 @@ class MainWindow : public QMainWindow QAction *mRenderWindowAct; void openRenderQueueWindow(const bool &focus = true); - QProgressBar *mRenderProgress; - void handleRenderProgress(int frame, int total); - void handleRenderFinished(); - protected: void keyPressEvent(QKeyEvent *event); bool eventFilter(QObject *obj, QEvent *e);