summaryrefslogtreecommitdiff
path: root/src/imgui_ui_timeline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/imgui_ui_timeline.cpp')
-rw-r--r--src/imgui_ui_timeline.cpp9
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();