From 96528524a6590c028925f098d2dd9203369fecaa Mon Sep 17 00:00:00 2001 From: MelekTaus Moribundus Date: Wed, 1 Jul 2026 21:52:46 +0200 Subject: [PATCH] Prefill save dialog with the selected painting name Co-Authored-By: Claude Opus 4.8 --- Assets/Scripts/PaintHud.Library.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/PaintHud.Library.cs b/Assets/Scripts/PaintHud.Library.cs index 28bf51a..90f6dd5 100644 --- a/Assets/Scripts/PaintHud.Library.cs +++ b/Assets/Scripts/PaintHud.Library.cs @@ -187,7 +187,10 @@ public partial class PaintHud private void OnSaveClicked() { if (!painter || !_saveDialog) return; - if (_nameInput) _nameInput.text = ""; + // Pre-fill the currently selected painting's name so "Save" defaults to overwriting it (empty when + // nothing is selected). The field is focused below; TMP's focus-select then highlights it so the + // first keystroke replaces it for a fresh name. + if (_nameInput) _nameInput.text = _selectedPainting ?? ""; if (_saveInfo) _saveInfo.text = ""; _saveDialog.SetActive(true); _saveDialog.transform.SetAsLastSibling(); // a dragged panel may have moved itself in front; stay on top