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.
This commit is contained in:
Robert Müller 2023-06-14 00:43:35 +02:00
parent 183086700f
commit 090433bc5e

View file

@ -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