summaryrefslogtreecommitdiff
path: root/src/imgui_ui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/imgui_ui.cpp')
-rw-r--r--src/imgui_ui.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/imgui_ui.cpp b/src/imgui_ui.cpp
index 612ee1a..5247716 100644
--- a/src/imgui_ui.cpp
+++ b/src/imgui_ui.cpp
@@ -489,6 +489,7 @@ ImGui_Viewport_TransformUI(project_data *File, project_state *State, memory *Mem
State->Interact_Active = interact_type_none;
State->Interact_Modifier = 0;
State->UpdateFrame = true;
+ Memory->PurgeCache = true;
}
// Second condition so you don't have to reach for Enter.
@@ -526,6 +527,7 @@ ImGui_Viewport_TransformUI(project_data *File, project_state *State, memory *Mem
History_Entry_End(Memory);
State->Interact_Active = interact_type_none;
State->Interact_Modifier = 0;
+ State->UncommitedKeyframe = 1;
State->UpdateFrame = true;
}
@@ -988,6 +990,10 @@ ImGui_ProcessInputs(project_data *File, project_state *State, ui *UI, memory *Me
State->Frame_Current = ((State->Frame_Current - 1) < 0) ? 0 : State->Frame_Current - 1;
State->UpdateFrame = true;
State->UpdateKeyframes = true;
+ if (State->UncommitedKeyframe) {
+ Memory->PurgeCache = true;
+ State->UncommitedKeyframe = false;
+ }
}
if (ImGui::IsKeyPressed(ImGuiKey_E)) {
if (!io.KeyShift) {
@@ -995,6 +1001,10 @@ ImGui_ProcessInputs(project_data *File, project_state *State, ui *UI, memory *Me
State->Frame_Current = ((State->Frame_Current + 1) >= MainComp->Frame_Count) ? 0 : State->Frame_Current + 1;
State->UpdateFrame = true;
State->UpdateKeyframes = true;
+ if (State->UncommitedKeyframe) {
+ Memory->PurgeCache = true;
+ State->UncommitedKeyframe = false;
+ }
} else {
State->Brush.EraseMode ^= 1;
}
@@ -1107,6 +1117,8 @@ ImGui_ProcessInputs(project_data *File, project_state *State, ui *UI, memory *Me
State->Interact_Active = interact_type_none;
State->Interact_Modifier = 0;
State->UpdateFrame = true;
+ State->UpdateKeyframes = true;
+ Memory->PurgeCache = true;
}
}
if (ImGui::IsKeyPressed(ImGuiKey_Space) ) {
@@ -1117,6 +1129,10 @@ ImGui_ProcessInputs(project_data *File, project_state *State, ui *UI, memory *Me
State->HotFramePerf = 1;
State->PlayAudio = false;
State->FramePlayingCount = 0;
+ if (State->UncommitedKeyframe) {
+ Memory->PurgeCache = true;
+ State->UncommitedKeyframe = false;
+ }
switch (SDL_GetAudioStatus())
{
case SDL_AUDIO_STOPPED: Assert(0); break;