diff --git a/Framework/C/Modules/Undo/Undo.cpp b/Framework/C/Modules/Undo/Undo.cpp index a60918fd..4af66530 100644 --- a/Framework/C/Modules/Undo/Undo.cpp +++ b/Framework/C/Modules/Undo/Undo.cpp @@ -5,7 +5,7 @@ extern "C" { #endif -void UImGui_StateTracker_push(UImGui_CTransaction transaction) +void UImGui_StateTracker_push(UImGui_CTransaction transaction, bool bRedoIsInit) { UImGui::StateTracker::push({ .undofunc = [&](UImGui::TransactionPayload& payload) -> void @@ -17,7 +17,7 @@ void UImGui_StateTracker_push(UImGui_CTransaction transaction) transaction.redoFunc(&payload); }, .payload = transaction.payload - }); + }, bRedoIsInit); } void UImGui_StateTracker_undo() diff --git a/Framework/C/Modules/Undo/Undo.h b/Framework/C/Modules/Undo/Undo.h index 334b0dfd..f897aebf 100644 --- a/Framework/C/Modules/Undo/Undo.h +++ b/Framework/C/Modules/Undo/Undo.h @@ -22,7 +22,8 @@ extern "C" } UImGui_CTransaction; // UntitledImGuiFramework Event Safety - Post-begin - UIMGUI_PUBLIC_API void UImGui_StateTracker_push(UImGui_CTransaction transaction); + // bRedoIsInit defaults to false in the C++ API + UIMGUI_PUBLIC_API void UImGui_StateTracker_push(UImGui_CTransaction transaction, bool bRedoIsInit); // UntitledImGuiFramework Event Safety - Post-begin UIMGUI_PUBLIC_API void UImGui_StateTracker_undo(); // UntitledImGuiFramework Event Safety - Post-begin