From 991f6dc96ceff31abffc91c6ae15d432b77eac99 Mon Sep 17 00:00:00 2001 From: luboslenco Date: Tue, 30 Sep 2025 17:56:49 +0200 Subject: [PATCH] Fix config restore --- paint/sources/box_preferences.ts | 15 --------------- paint/sources/context.ts | 6 ++++++ 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/paint/sources/box_preferences.ts b/paint/sources/box_preferences.ts index 1355f743..090b6c88 100644 --- a/paint/sources/box_preferences.ts +++ b/paint/sources/box_preferences.ts @@ -515,21 +515,6 @@ function box_preferences_pen_tab() { } function box_preferences_viewport_tab() { - context_raw.hssao = ui_handle(__ID__); - if (context_raw.hssao.init) { - context_raw.hssao.b = config_raw.rp_ssao; - } - - context_raw.hbloom = ui_handle(__ID__); - if (context_raw.hbloom.init) { - context_raw.hbloom.b = config_raw.rp_bloom; - } - - context_raw.hsupersample = ui_handle(__ID__); - if (context_raw.hsupersample.init) { - context_raw.hsupersample.i = config_get_super_sample_quality(config_raw.rp_supersample); - } - let mode_handle: ui_handle_t = ui_handle(__ID__); if (mode_handle.init) { mode_handle.i = config_raw.viewport_mode; diff --git a/paint/sources/context.ts b/paint/sources/context.ts index 1504de3a..82af1d77 100644 --- a/paint/sources/context.ts +++ b/paint/sources/context.ts @@ -285,6 +285,12 @@ function context_create(): context_t { c.brush_locked = false; c.camera_type = camera_type_t.PERSPECTIVE; c.cam_handle = ui_handle_create(); + c.hssao = ui_handle_create(); + c.hbloom = ui_handle_create(); + c.hsupersample = ui_handle_create(); + c.hssao.b = config_raw.rp_ssao; + c.hbloom.b = config_raw.rp_bloom; + c.hsupersample.i = config_get_super_sample_quality(config_raw.rp_supersample); c.texture_export_path = ""; c.last_status_position = 0; c.camera_controls = camera_controls_t.ORBIT;