Commit 0eb69ac1 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix undo set effect zone

parent 7816192f
Pipeline #53417 passed with stage
in 10 minutes and 23 seconds
......@@ -244,8 +244,9 @@ QPair <int, int> EffectItemModel::getInOut() const
void EffectItemModel::setInOut(const QString &effectName, QPair<int, int>bounds, bool enabled)
{
QPair<int, int>currentInOut = {m_asset->get_int("in"), m_asset->get_int("out")};
Fun undo = [this, enabled, currentInOut]() {
m_asset->set("kdenlive:force_in_out", enabled ? 0 : 1);
int currentState = m_asset->get_int("kdenlive:force_in_out");
Fun undo = [this, currentState, currentInOut]() {
m_asset->set("kdenlive:force_in_out", currentState);
m_asset->set("in", currentInOut.first);
m_asset->set("out", currentInOut.second);
emit AssetParameterModel::updateChildren({QStringLiteral("in"), QStringLiteral("out")});
......@@ -253,7 +254,7 @@ void EffectItemModel::setInOut(const QString &effectName, QPair<int, int>bounds,
pCore->refreshProjectItem(m_ownerId);
pCore->invalidateItem(m_ownerId);
}
emit showEffectZone(currentInOut, enabled);
emit showEffectZone(currentInOut, currentState == 1);
return true;
};
Fun redo = [this, enabled, bounds]() {
......
......@@ -190,7 +190,7 @@ Item {
height: 2
width: (effectZones[index].y - effectZones[index].x) * timeline.scaleFactor
color: 'blueviolet'
opacity: 0.5
opacity: 0.8
anchors.bottom: parent.bottom
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment