Переход на object_id

This commit is contained in:
2026-02-26 20:57:35 +03:00
parent f55a756132
commit 291dbd6f85
8 changed files with 80 additions and 26 deletions

View File

@@ -12,8 +12,8 @@ pub const OpenDocument = struct {
document: Document,
cpu_render: CpuRenderEngine,
canvas: Canvas,
/// Выбранный объект в дереве (указатель, не индекс).
selected_object: ?*Document.Object = null,
/// Выбранный объект в дереве (id объекта).
selected_object_id: ?u64 = null,
pub fn init(allocator: std.mem.Allocator, self: *OpenDocument) void {
const default_size = basic_models.Size_f{ .w = 800, .h = 600 };
@@ -24,7 +24,7 @@ pub const OpenDocument = struct {
&self.document,
(&self.cpu_render).renderEngine(),
);
self.selected_object = null;
self.selected_object_id = null;
}
pub fn deinit(self: *OpenDocument) void {