Skip to content

Commit

Permalink
Queue: Fix missing labels on project load
Browse files Browse the repository at this point in the history
Fix the annoying -none- issue

Ref: #119
  • Loading branch information
rodlie committed Mar 1, 2024
1 parent 269879a commit 99c7266
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/app/GUI/RenderWidgets/renderinstancewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "renderinstancewidget.h"
#include "GUI/global.h"
#include <QMenu>
#include "canvas.h"
#include "outputsettingsdialog.h"
#include "outputsettingsprofilesdialog.h"
#include "outputsettingsdisplaywidget.h"
Expand Down Expand Up @@ -389,6 +390,15 @@ void RenderInstanceWidget::read(eReadStream &src) {
setChecked(checked);
}

void RenderInstanceWidget::updateRenderSettings()
{
const RenderSettings &renderSettings = mSettings.getRenderSettings();
mRenderSettingsDisplayWidget->setRenderSettings(mSettings.getTargetCanvas(),
renderSettings);
const auto label = mSettings.getTargetCanvas()->prp_getName();
if (!label.isEmpty()) { mNameLabel->setText(label); }
}

#include "Private/esettings.h"
OutputProfilesListButton::OutputProfilesListButton(RenderInstanceWidget *parent) :
QPushButton(parent) {
Expand Down
2 changes: 2 additions & 0 deletions src/app/GUI/RenderWidgets/renderinstancewidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ class RenderInstanceWidget : public ClosableContainer {

void write(eWriteStream &dst) const;
void read(eReadStream &src);
void updateRenderSettings();

protected:
void mousePressEvent(QMouseEvent* e);
private:
Expand Down
7 changes: 7 additions & 0 deletions src/app/GUI/RenderWidgets/renderwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,13 @@ void RenderWidget::read(eReadStream &src)
}
}

void RenderWidget::updateRenderSettings()
{
for (const auto &wid: mRenderInstanceWidgets) {
wid->updateRenderSettings();
}
}

void RenderWidget::render(RenderInstanceSettings &settings)
{
const RenderSettings &renderSettings = settings.getRenderSettings();
Expand Down
1 change: 1 addition & 0 deletions src/app/GUI/RenderWidgets/renderwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class RenderWidget : public QWidget
void clearRenderQueue();
void write(eWriteStream& dst) const;
void read(eReadStream& src);
void updateRenderSettings();

signals:
void progress(int frame, int total);
Expand Down
1 change: 1 addition & 0 deletions src/app/evfileio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ void MainWindow::loadEVFile(const QString &path) {
}
file.close();
addRecentFile(path);
mRenderWidget->updateRenderSettings();
}

void MainWindow::saveToFile(const QString &path,
Expand Down

0 comments on commit 99c7266

Please sign in to comment.