| 2063 | } |
| 2064 | |
| 2065 | void EffectStackModel::applyAssetCommand(int row, const QModelIndex &index, const QString &previousValue, QString value, QUndoCommand *command) |
| 2066 | { |
| 2067 | |
| 2068 | auto item = getEffectStackRow(row); |
| 2069 | if (!item || item->childCount() > 0) { |
| 2070 | // group, error |
| 2071 | return; |
| 2072 | } |
| 2073 | std::shared_ptr<EffectItemModel> eff = std::static_pointer_cast<EffectItemModel>(item); |
| 2074 | const std::shared_ptr<AssetParameterModel> effectParamModel = std::static_pointer_cast<AssetParameterModel>(eff); |
| 2075 | if (KdenliveSettings::applyEffectParamsToGroupWithSameValue()) { |
| 2076 | const QString currentValue = effectParamModel->data(index, AssetParameterModel::ValueRole).toString(); |
| 2077 | if (previousValue != currentValue) { |
| 2078 | // Don't apply change on this effect, the start value is not the same |
| 2079 | return; |
| 2080 | } |
| 2081 | } |
| 2082 | new AssetCommand(effectParamModel, index, value, command); |
| 2083 | } |
| 2084 | |
| 2085 | void EffectStackModel::applyAssetKeyframeCommand(int row, const QModelIndex &index, GenTime pos, const QVariant &previousValue, QVariant value, int ix, |
| 2086 | QUndoCommand *command) |
no test coverage detected