code: use config macro

Macro is much easier to use and more readable
This commit is contained in:
itsmattkc
2022-05-04 09:50:34 -07:00
parent 5f13a83009
commit 91b761693b
38 changed files with 105 additions and 106 deletions
+3 -3
View File
@@ -222,7 +222,7 @@ void ImportTool::FootageToGhosts(rational ghost_start, const DraggedFootageData
if (footage_duration.isNull()) {
// Fallback to still length if legngth was 0
footage_duration = Config::Current()[QStringLiteral("DefaultStillLength")].value<rational>();
footage_duration = OLIVE_CONFIG("DefaultStillLength").value<rational>();
}
}
@@ -285,7 +285,7 @@ void ImportTool::DropGhosts(bool insert)
} else {
// There's no active timeline here, ask the user what to do
DropWithoutSequenceBehavior behavior = static_cast<DropWithoutSequenceBehavior>(Config::Current()["DropWithoutSequenceBehavior"].toInt());
DropWithoutSequenceBehavior behavior = static_cast<DropWithoutSequenceBehavior>(OLIVE_CONFIG("DropWithoutSequenceBehavior").toInt());
if (behavior == kDWSAsk) {
QCheckBox* dont_ask_again_box = new QCheckBox(QCoreApplication::translate("ImportTool", "Don't ask me again"));
@@ -312,7 +312,7 @@ void ImportTool::DropGhosts(bool insert)
}
if (behavior != kDWSDisable && dont_ask_again_box->isChecked()) {
Config::Current()["DropWithoutSequenceBehavior"] = behavior;
OLIVE_CONFIG("DropWithoutSequenceBehavior") = behavior;
}
}