mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
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:
parent
183086700f
commit
090433bc5e
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue