From 207b0820ddf8e7f5386df76c05395c463e8c2f8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Wed, 9 Sep 2026 00:52:48 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E5=88=86=E7=A6=BB=E6=A0=91?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=A0=BC=E5=BC=8F=20=E6=8C=89=E4=BB=93?= =?UTF-8?q?=E5=BA=93=20rustfmt=20=E8=A7=84=E8=8C=83=E6=95=B4=E7=90=86=20sy?= =?UTF-8?q?nthetic=20root=20=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src-tauri/src/ui_editor/commands/separation/tree.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/tree.rs b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/tree.rs index 45c93dbec..b600c48e1 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/tree.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/tree.rs @@ -1,5 +1,5 @@ use super::model::*; -use crate::ui_editor::component::{image::ImageComponent, Component}; +use crate::ui_editor::component::{Component, image::ImageComponent}; use crate::ui_editor::layout::node::Node; use crate::ui_editor::state::{State, UITree}; use crate::ui_editor::utils::NodeId; @@ -88,11 +88,8 @@ pub fn construct_separation_state(state: &State) -> SeparationState { // The synthetic root must never share an ID with a real // UI node. A single-image design may use the original // tree root as an eligible separation leaf. - id: NodeId::new(format!( - "separation-root-{}", - uuid::Uuid::new_v4().simple() - )) - .expect("synthetic separation root id is valid"), + id: NodeId::new(format!("separation-root-{}", uuid::Uuid::new_v4().simple())) + .expect("synthetic separation root id is valid"), global_pos_x_px: 0, global_pos_y_px: 0, width_px: image.pixel_size.x.max(0.0).round() as u32,