mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix opening file in editor with enter not working after searching
The filename of the selected file is tracked separately and was not updated when the search term in the Open File dialog is changed.
This commit is contained in:
parent
4fa433960b
commit
dc2601f335
|
@ -4374,6 +4374,10 @@ void CEditor::RenderFileDialog()
|
||||||
str_copy(m_aFilesSelectedName, m_vpFilteredFileList[m_FilesSelectedIndex]->m_aName);
|
str_copy(m_aFilesSelectedName, m_vpFilteredFileList[m_FilesSelectedIndex]->m_aName);
|
||||||
else
|
else
|
||||||
m_aFilesSelectedName[0] = '\0';
|
m_aFilesSelectedName[0] = '\0';
|
||||||
|
if(m_FilesSelectedIndex >= 0 && !m_vpFilteredFileList[m_FilesSelectedIndex]->m_IsDir)
|
||||||
|
str_copy(m_aFileDialogFileName, m_vpFilteredFileList[m_FilesSelectedIndex]->m_aFilename);
|
||||||
|
else
|
||||||
|
m_aFileDialogFileName[0] = '\0';
|
||||||
s_ListBox.ScrollToSelected();
|
s_ListBox.ScrollToSelected();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue