Repository: godotengine/godot (language: cpp)

Issue:
3D Editor: Snap Setting values (Transform > Configure Snap...) not displayed correctly after switching opened scenes and open dialog again
### Tested versions


Version 4.4 dev5
Version 4.4 dev4
Version 4.3 stable
Version 4.2 stable
Version 4.1 stable

### System information

Windos 10 AMD Ryzen 7 2700X; 32GB RAM; Radeon RX 580 (8 GB RAM)

### Issue description

After switching opened 3D scenes, snap setting values are not displayed as entered. 

STR will clarify the issue.

It seems to be display problem only. Moving, rotating and scaling is working with the saved values, not the later displayed ones.

### Steps to reproduce

1. Open Snap Settings Dialog
2. Change any of the three values (translate snap, rotate snap or scale snap)
   - sample values to test (0.2, 1.4, 0.5, 1.5)
3. Apply changes via OK
4. Switch to another scene
5. Switch back to the scene selected before
6. Open the Snap Settings Dialog again
   - sample values displayed now (0.20000000298023, 1.39999997615814, 0.5, 1.5)

Entered values:

![Image](https://github.com/user-attachments/assets/50c7202b-17dd-4b01-800e-301ca8d7757a)

Values after switching to another scene and back:

![Image](https://github.com/user-attachments/assets/90c09c15-e7c9-4b2a-83f5-07fec123d4a0)



### Minimal reproduction project (MRP)

Can be tested by just opening or creating a project, open or create two new scenes and follow STR.


Discussion / hints:

Fix patch:
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index f0008406958e..037c165d43f6 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -6629,9 +6629,12 @@ void Node3DEditor::_snap_changed() {
 }
 
 void Node3DEditor::_snap_update() {
-	snap_translate->set_text(String::num(snap_translate_value));
-	snap_rotate->set_text(String::num(snap_rotate_value));
-	snap_scale->set_text(String::num(snap_scale_value));
+	double snap = EDITOR_GET("interface/inspector/default_float_step");
+	int snap_step_decimals = Math::range_step_decimals(snap);
+
+	snap_translate->set_text(String::num(snap_translate_value, snap_step_decimals));
+	snap_rotate->set_text(String::num(snap_rotate_value, snap_step_decimals));
+	snap_scale->set_text(String::num(snap_scale_value, snap_step_decimals));
 }
 
 void Node3DEditor::_xform_dialog_action() {


Test patch: