mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-14 03:58:18 +00:00
reset timemodified sort
This commit is contained in:
parent
fb5cb3e131
commit
223813e519
|
@ -4323,7 +4323,7 @@ void CEditor::RenderFileDialog()
|
||||||
m_SortByTimeModified = 1;
|
m_SortByTimeModified = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
SortFilteredFileList();
|
RefreshFilteredFileList();
|
||||||
}
|
}
|
||||||
|
|
||||||
static int s_ButtonFileName = 0;
|
static int s_ButtonFileName = 0;
|
||||||
|
@ -4334,13 +4334,15 @@ void CEditor::RenderFileDialog()
|
||||||
if(m_SortByFilename == 1)
|
if(m_SortByFilename == 1)
|
||||||
{
|
{
|
||||||
m_SortByFilename = -1;
|
m_SortByFilename = -1;
|
||||||
|
m_SortByTimeModified = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_SortByFilename = 1;
|
m_SortByFilename = 1;
|
||||||
|
m_SortByTimeModified = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
SortFilteredFileList();
|
RefreshFilteredFileList();
|
||||||
}
|
}
|
||||||
|
|
||||||
Title.Draw(ColorRGBA(1, 1, 1, 0.25f), IGraphics::CORNER_ALL, 4.0f);
|
Title.Draw(ColorRGBA(1, 1, 1, 0.25f), IGraphics::CORNER_ALL, 4.0f);
|
||||||
|
@ -4672,6 +4674,7 @@ void CEditor::RefreshFilteredFileList()
|
||||||
m_vpFilteredFileList.push_back(&Item);
|
m_vpFilteredFileList.push_back(&Item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
SortFilteredFileList();
|
||||||
if(!m_vpFilteredFileList.empty())
|
if(!m_vpFilteredFileList.empty())
|
||||||
{
|
{
|
||||||
if(m_aFilesSelectedName[0])
|
if(m_aFilesSelectedName[0])
|
||||||
|
@ -4711,7 +4714,6 @@ void CEditor::FilelistPopulate(int StorageType, bool KeepSelection)
|
||||||
}
|
}
|
||||||
Storage()->ListDirectoryInfo(StorageType, m_pFileDialogPath, EditorListdirCallback, this);
|
Storage()->ListDirectoryInfo(StorageType, m_pFileDialogPath, EditorListdirCallback, this);
|
||||||
RefreshFilteredFileList();
|
RefreshFilteredFileList();
|
||||||
SortFilteredFileList();
|
|
||||||
if(!KeepSelection)
|
if(!KeepSelection)
|
||||||
{
|
{
|
||||||
m_FilesSelectedIndex = m_vpFilteredFileList.empty() ? -1 : 0;
|
m_FilesSelectedIndex = m_vpFilteredFileList.empty() ? -1 : 0;
|
||||||
|
|
Loading…
Reference in a new issue