From 9062e0aae9f2f576b7a237c28028aa6b09feee5e Mon Sep 17 00:00:00 2001 From: Fox Caminiti Date: Wed, 17 Aug 2022 23:41:08 -0400 Subject: undo and pen development --- createcalls.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'createcalls.cpp') diff --git a/createcalls.cpp b/createcalls.cpp index f2a173f..5564264 100644 --- a/createcalls.cpp +++ b/createcalls.cpp @@ -31,7 +31,7 @@ Source_Generate(project_data *File, memory *Memory, void *Path) } if (Found) { - Action_Entry_Begin(Memory, action_entry_default, "Add source"); + Action_Entry_Commit(Memory, action_entry_default, "Add source"); Action_Change_Commit(Memory, &Source->Path, &Source->Path, &Path, action_change_ptr); uint32 i = File->NumberOfSources + 1; Action_Change_Commit(Memory, &File->NumberOfSources, &File->NumberOfSources, &i, action_change_u16); @@ -141,7 +141,7 @@ project_layer * Layer_Init(project_data *File, memory *Memory) // from this index in the Action tree since all we need to do to "delete" // the layer is to unset this. The layer that gets made here is always at // the top of the index. - Action_Entry_Begin(Memory, action_entry_layerinit, "Create layer"); + Action_Entry_Commit(Memory, action_entry_layerinit, "Create layer"); Action_Change_Commit(Memory, &File->NumberOfLayers, &Index, &NextIndex, action_change_u16); File->Layer[Index] = (project_layer *)AllocateMemory(Memory, sizeof(project_layer), F_Layers); @@ -372,7 +372,8 @@ Layer_UpdateBitmap(project_data *File, project_layer *Layer, memory *Memory, int if (Layer->NumberOfMasks) { for (int i = 0; i < Layer->NumberOfMasks; i++) { mask *Mask = &Layer->Mask[i]; - Mask_TriangulateAndRasterize(Memory, Layer, Mask); + if (Mask->IsClosed) + Mask_TriangulateAndRasterize(Memory, Layer, Mask); } } -- cgit v1.2.3