code: use config macro
Macro is much easier to use and more readable
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user