diff options
author | Fox Caminiti <fox@foxcam.net> | 2023-02-11 17:37:49 -0500 |
---|---|---|
committer | Fox Caminiti <fox@foxcam.net> | 2023-02-11 17:37:49 -0500 |
commit | bd25daeae033e4f905ae0145831a7d8fdd92e471 (patch) | |
tree | 7e602f31449d8eb58212a028e91e7eb32e4bbf84 /src/imgui_ui_timeline.cpp | |
parent | 52c6ad3f2686cb66a8954ca5dac7f3eba4676cc3 (diff) |
v4.0
Diffstat (limited to 'src/imgui_ui_timeline.cpp')
-rw-r--r-- | src/imgui_ui_timeline.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/imgui_ui_timeline.cpp b/src/imgui_ui_timeline.cpp index aa4d0cd..964f7c5 100644 --- a/src/imgui_ui_timeline.cpp +++ b/src/imgui_ui_timeline.cpp @@ -653,12 +653,21 @@ ImGui_Timeline_DrawPrecomp(project_data *File, project_state *State, memory *Mem ImVec2 ColSize(Size, Size); if (ImGui::Button("##test", ColSize)) { int h = 0, z = 0, i = 0; + bool32 Commit = false; while (Block_Loop(Memory, F_Layers, File->Layer_Count, &h, &z, &i)) { block_layer *Layer = (block_layer *)Memory_Block_AddressAtIndex(Memory, F_Layers, i); if (Layer->IsSelected & 0x01) { + if (!Commit) { + History_Entry_Commit(Memory, "Change layer colors"); + Commit = true; + } + History_Action_Swap(Memory, F_Layers, sizeof(Layer->ColIndex), &Layer->ColIndex); Layer->ColIndex = c; } } + if (Commit) { + History_Entry_End(Memory); + } } if ((c+1) % 4) { ImGui::SameLine(); } ImGui::PopStyleColor(); |