add blend mode to layer history

This commit is contained in:
2019-06-20 10:06:18 +02:00
parent dabfedb089
commit 83372b2ba8
2 changed files with 4 additions and 0 deletions

View File

@@ -342,6 +342,7 @@ void NodePanelLayer::save_history()
s.alpha = l->m_opacity; s.alpha = l->m_opacity;
s.lock = l->m_alpha_locked; s.lock = l->m_alpha_locked;
s.visible = l->m_visible; s.visible = l->m_visible;
s.blend_mode = l->m_blend_mode;
a->m_layers.push_back(s); a->m_layers.push_back(s);
} }
ActionManager::add(a); ActionManager::add(a);
@@ -520,6 +521,7 @@ void ActionLayerChange::undo()
l->m_opacity = m_layers[i].alpha; l->m_opacity = m_layers[i].alpha;
l->m_alpha_locked = m_layers[i].lock; l->m_alpha_locked = m_layers[i].lock;
l->m_visible = m_layers[i].visible; l->m_visible = m_layers[i].visible;
l->m_blend_mode = m_layers[i].blend_mode;
} }
m_panel->update_attributes(); m_panel->update_attributes();
} }
@@ -534,6 +536,7 @@ Action* ActionLayerChange::get_redo()
s.alpha = l->m_opacity; s.alpha = l->m_opacity;
s.lock = l->m_alpha_locked; s.lock = l->m_alpha_locked;
s.visible = l->m_visible; s.visible = l->m_visible;
s.blend_mode = l->m_blend_mode;
a->m_layers.push_back(s); a->m_layers.push_back(s);
} }
return a; return a;

View File

@@ -86,6 +86,7 @@ struct ActionLayerChange : public Action
bool visible; bool visible;
float alpha; float alpha;
bool lock; bool lock;
int blend_mode;
}; };
NodePanelLayer* m_panel; NodePanelLayer* m_panel;
std::vector<LayerState> m_layers; std::vector<LayerState> m_layers;