From 090433bc5e1ff082283e72f2df5472b7d13ca41d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Wed, 14 Jun 2023 00:43:35 +0200 Subject: [PATCH] Don't remove the `.map` suffix in editor file dialog This otherwise breaks file loading because the file extension is expected in this input buffer even when the input is not rendered. Regression from #6736. --- src/game/editor/editor.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/game/editor/editor.cpp b/src/game/editor/editor.cpp index 5d61ea90b..b26ef2f56 100644 --- a/src/game/editor/editor.cpp +++ b/src/game/editor/editor.cpp @@ -4850,10 +4850,7 @@ void CEditor::RenderFileDialog() str_copy(m_aFilesSelectedName, m_vpFilteredFileList[m_FilesSelectedIndex]->m_aName); const bool WasChanged = m_FileDialogFileNameInput.WasChanged(); if(!m_vpFilteredFileList[m_FilesSelectedIndex]->m_IsDir) - { m_FileDialogFileNameInput.Set(m_vpFilteredFileList[m_FilesSelectedIndex]->m_aFilename); - m_FileDialogFileNameInput.SetRange("", m_FileDialogFileNameInput.GetLength() - str_length(".map"), m_FileDialogFileNameInput.GetLength()); - } else m_FileDialogFileNameInput.Clear(); if(!WasChanged) // ensure that changed flag is not set if it wasn't previously set, as this would reset the selection after DoEditBox is called