Случайное дерево объектов
This commit is contained in:
@@ -60,6 +60,7 @@ pub fn addNewDocument(self: *WindowContext) !void {
|
||||
const ptr = try self.allocator.create(OpenDocument);
|
||||
errdefer self.allocator.destroy(ptr);
|
||||
OpenDocument.init(self.allocator, ptr);
|
||||
try ptr.document.addRandomShapes(std.crypto.random);
|
||||
try self.documents.append(self.allocator, ptr);
|
||||
self.active_document_index = self.documents.items.len - 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user