Commit fbeee949 authored by Julius Künzel's avatar Julius Künzel
Browse files

Render Dialog: remember state of "more options"

BUG: 433600
parent e5c2aa18
Pipeline #52392 passed with stage
in 10 minutes and 23 seconds
......@@ -369,6 +369,7 @@ RenderWidget::RenderWidget(bool enableProxy, QWidget *parent)
}
m_view.field_order->setEnabled(false);
connect(m_view.scanning_list, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [this](int index) { m_view.field_order->setEnabled(index == 2); });
loadConfig();
refreshView();
focusFirstVisibleItem();
adjustSize();
......@@ -406,6 +407,7 @@ QSize RenderWidget::sizeHint() const
RenderWidget::~RenderWidget()
{
saveConfig();
m_view.running_jobs->blockSignals(true);
m_view.scripts_list->blockSignals(true);
m_view.running_jobs->clear();
......@@ -416,6 +418,21 @@ RenderWidget::~RenderWidget()
delete m_jobInfoMessage;
}
void RenderWidget::saveConfig()
{
KSharedConfigPtr config = KSharedConfig::openConfig();
KConfigGroup resourceConfig(config, "RenderWidget");
resourceConfig.writeEntry(QStringLiteral("showoptions"), m_view.options->isChecked());
config->sync();
}
void RenderWidget::loadConfig()
{
KSharedConfigPtr config = KSharedConfig::openConfig();
KConfigGroup resourceConfig(config, "RenderWidget");
m_view.options->setChecked(resourceConfig.readEntry("showoptions", false));
}
void RenderWidget::slotEditItem(QTreeWidgetItem *item)
{
if (item->parent() == nullptr) {
......
......@@ -121,6 +121,8 @@ class RenderWidget : public QDialog
public:
explicit RenderWidget(bool enableProxy, QWidget *parent = nullptr);
~RenderWidget() override;
void saveConfig();
void loadConfig();
void setGuides(std::weak_ptr<MarkerListModel> guidesModel);
void focusFirstVisibleItem(const QString &profile = QString());
void setRenderJob(const QString &dest, int progress = 0, int frame = 0);
......
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