cherrypicked relevant commits from master

This commit is contained in:
itsmattkc
2019-04-21 23:03:35 +10:00
parent ae37b927ec
commit 43284ced8b
3 changed files with 16 additions and 1 deletions
+6 -1
View File
@@ -82,7 +82,8 @@ Config::Config()
playback_bit_depth(olive::PIX_FMT_RGBA16F),
export_bit_depth(olive::PIX_FMT_RGBA32F),
dont_use_proxies_on_export(true),
maximum_recent_projects(10)
maximum_recent_projects(10),
locked_panels(false)
{}
void Config::load(QString path) {
@@ -267,6 +268,9 @@ void Config::load(QString path) {
} else if (stream.name() == "DontUseProxiesOnExport") {
stream.readNext();
dont_use_proxies_on_export = (stream.text() == "1");
} else if (stream.name() == "LockedPanels") {
stream.readNext();
locked_panels = (stream.text() == "1");
}
}
}
@@ -349,6 +353,7 @@ void Config::save(QString path) {
stream.writeTextElement("PlaybackBitDepth", QString::number(playback_bit_depth));
stream.writeTextElement("ExportBitDepth", QString::number(export_bit_depth));
stream.writeTextElement("DontUseProxiesOnExport", QString::number(dont_use_proxies_on_export));
stream.writeTextElement("LockedPanels", QString::number(locked_panels));
stream.writeEndElement(); // configuration
stream.writeEndDocument(); // doc
+5
View File
@@ -614,6 +614,11 @@ struct Config {
*/
int maximum_recent_projects;
/**
* @brief Sets whether panels should load locked or not
*/
bool locked_panels;
/**
* @brief Load config from file
*
+5
View File
@@ -285,6 +285,9 @@ MainWindow::MainWindow(QWidget *parent) :
olive::Global->check_for_autorecovery_file();
// lock panels if the config says so
set_panels_locked(olive::config.locked_panels);
// set up output audio device
init_audio();
@@ -1193,6 +1196,8 @@ void MainWindow::set_panels_locked(bool locked)
panel->setTitleBarWidget(nullptr);
}
}
olive::config.locked_panels = locked;
}
void MainWindow::fileMenu_About_To_Be_Shown() {