mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-15 09:32:09 +00:00
FIX: PrinterFileSystem crash when switch file type
Change-Id: I25b0659d7a33bda5bb1157c967dac300b41696a9 Github: 2633
This commit is contained in:
@@ -91,6 +91,7 @@ void PrinterFileSystem::SetFileType(FileType type, std::string const &storage)
|
||||
m_file_list.swap(m_file_list_cache[{m_file_type, m_file_storage}]);
|
||||
m_lock_start = m_lock_end = 0;
|
||||
BuildGroups();
|
||||
UpdateGroupSelect();
|
||||
SendChangedEvent(EVT_FILE_CHANGED);
|
||||
if (type == F_INVALID_TYPE)
|
||||
return;
|
||||
@@ -515,10 +516,10 @@ void PrinterFileSystem::Stop(bool quit)
|
||||
|
||||
void PrinterFileSystem::BuildGroups()
|
||||
{
|
||||
if (m_file_list.empty())
|
||||
return;
|
||||
m_group_year.clear();
|
||||
m_group_month.clear();
|
||||
if (m_file_list.empty())
|
||||
return;
|
||||
wxDateTime t = wxDateTime((time_t) m_file_list.front().time);
|
||||
m_group_year.push_back(0);
|
||||
m_group_month.push_back(0);
|
||||
|
||||
Reference in New Issue
Block a user