Clean up old usages of NodeId(generate_uuid()) by replacing it with NodeId::new() (#2009)

Replace all `NodeId(generate_uuid())` with `NodeId::new()`
This commit is contained in:
Mohamed Osama
2024-10-26 05:43:46 +03:00
committed by GitHub
parent dae6b2f239
commit 3c839ffd2b
21 changed files with 46 additions and 61 deletions

View File

@@ -7,7 +7,6 @@
use crate::helpers::translate_key;
use crate::{Error, EDITOR, EDITOR_HANDLE, EDITOR_HAS_CRASHED};
use editor::application::generate_uuid;
use editor::application::Editor;
use editor::consts::FILE_SAVE_SUFFIX;
use editor::messages::input_mapper::utility_types::input_keyboard::ModifierKeys;
@@ -574,7 +573,7 @@ impl EditorHandle {
/// Creates a new document node in the node graph
#[wasm_bindgen(js_name = createNode)]
pub fn create_node(&self, node_type: String, x: i32, y: i32) {
let id = NodeId(generate_uuid());
let id = NodeId::new();
let message = NodeGraphMessage::CreateNodeFromContextMenu {
node_id: Some(id),
node_type,