Commit cc6faad0 authored by Dmitry Kazakov's avatar Dmitry Kazakov Committed by Boudewijn Rempt

Fix saving of lastly used video encoding options

parent 7a99875a
......@@ -321,9 +321,11 @@ KisPropertiesConfigurationSP DlgAnimationRenderer::getEncoderConfiguration() con
return cfg;
}
void DlgAnimationRenderer::setEncoderConfiguration(KisPropertiesConfigurationSP /*cfg*/)
void DlgAnimationRenderer::setEncoderConfiguration(KisPropertiesConfigurationSP cfg)
{
if (m_encoderConfigWidget) {
m_encoderConfigWidget->setConfiguration(cfg);
}
}
QSharedPointer<KisImportExportFilter> DlgAnimationRenderer::encoderFilter() const
......@@ -369,6 +371,8 @@ void DlgAnimationRenderer::selectRenderOptions()
dlg.setButtons(KoDialog::Ok | KoDialog::Cancel);
if (!dlg.exec()) {
m_encoderConfigWidget->setConfiguration(filter->lastSavedConfiguration());
} else {
KisConfig().setExportConfiguration(mimetype.toLatin1(), m_encoderConfigWidget->configuration());
}
dlg.setMainWidget(0);
m_encoderConfigWidget->hide();
......
......@@ -198,9 +198,18 @@ void VideoExportOptionsDialog::setConfiguration(const KisPropertiesConfiguration
ui->cmbTune->setCurrentIndex(m_d->defaultTune);
m_d->defaultBitrate = cfg->getInt("TheoraBitrate", 5000);
ui->intBitrate->setValue(m_d->defaultBitrate);
m_d->defaultCustomLine = cfg->getString("CustomLineValue", QString());
ui->txtCustomLine->setText(m_d->defaultCustomLine);
if (!m_d->defaultCustomLine.isEmpty()) {
m_d->currentCustomLine = m_d->defaultCustomLine;
ui->chkCustomLine->setChecked(true);
}
ui->chkCustomLine->setChecked(!m_d->defaultCustomLine.isEmpty());
slotCustomLineToggled(!m_d->defaultCustomLine.isEmpty());
if (cfg->hasProperty("CodecIndex")) {
setCodec((VideoExportOptionsDialog::CodecIndex)cfg->getInt("CodecIndex"));
}
......
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