This commit is contained in:
itsmattkc
2019-04-18 02:39:11 +10:00
parent 73ebf0042d
commit 027ce82a66
3 changed files with 16 additions and 1 deletions
+6 -1
View File
@@ -78,7 +78,8 @@ Config::Config()
default_sequence_height(1080),
default_sequence_framerate(29.97),
default_sequence_audio_frequency(48000),
default_sequence_audio_channel_layout(3)
default_sequence_audio_channel_layout(3),
locked_panels(false)
{}
void Config::load(QString path) {
@@ -239,6 +240,9 @@ void Config::load(QString path) {
} else if (stream.name() == "DefaultSequenceAudioLayout") {
stream.readNext();
default_sequence_audio_channel_layout = stream.text().toInt();
} else if (stream.name() == "LockedPanels") {
stream.readNext();
locked_panels = (stream.text() == "1");
}
}
}
@@ -313,6 +317,7 @@ void Config::save(QString path) {
stream.writeTextElement("DefaultSequenceFrameRate", QString::number(default_sequence_framerate));
stream.writeTextElement("DefaultSequenceAudioFrequency", QString::number(default_sequence_audio_frequency));
stream.writeTextElement("DefaultSequenceAudioLayout", QString::number(default_sequence_audio_channel_layout));
stream.writeTextElement("LockedPanels", QString::number(locked_panels));
stream.writeEndElement(); // configuration
stream.writeEndDocument(); // doc
+5
View File
@@ -558,6 +558,11 @@ struct Config {
*/
int default_sequence_audio_channel_layout;
/**
* @brief Sets whether panels should load locked or not
*/
bool locked_panels;
/**
* @brief Load config from file
*
+5
View File
@@ -279,6 +279,9 @@ MainWindow::MainWindow(QWidget *parent) :
olive::Global->check_for_autorecovery_file();
// lock panels if the config says so
set_panels_locked(olive::CurrentConfig.locked_panels);
// set up output audio device
init_audio();
@@ -1188,6 +1191,8 @@ void MainWindow::set_panels_locked(bool locked)
panel->setTitleBarWidget(nullptr);
}
}
olive::CurrentConfig.locked_panels = locked;
}
void MainWindow::fileMenu_About_To_Be_Shown() {