FIX: clear error after reload file list ok
Change-Id: I5d5e4f2870302b198d3a9d40603a6fa8010b7e76 Jira: STUDIO-6306
This commit is contained in:
parent
135abff7c3
commit
89f40dd6fc
|
@ -270,7 +270,7 @@ void MediaFilePanel::SetMachineObject(MachineObject* obj)
|
|||
return;
|
||||
m_time_panel->Show(fs->GetFileType() < PrinterFileSystem::F_MODEL);
|
||||
//m_manage_panel->Show(fs->GetFileType() < PrinterFileSystem::F_MODEL);
|
||||
m_button_refresh->Enable(true);
|
||||
m_button_refresh->Enable(fs->GetStatus() == PrinterFileSystem::ListReady);
|
||||
m_button_management->Enable(fs->GetCount() > 0);
|
||||
bool download_support = fs->GetFileType() < PrinterFileSystem::F_MODEL || m_model_download_support;
|
||||
m_image_grid->ShowDownload(download_support);
|
||||
|
@ -300,13 +300,13 @@ void MediaFilePanel::SetMachineObject(MachineObject* obj)
|
|||
case PrinterFileSystem::Connecting: icon = m_bmp_loading; msg = _L("Connecting..."); break;
|
||||
case PrinterFileSystem::Failed: icon = m_bmp_failed; if (extra != 1) msg = _L("Please check the network and try again, You can restart or update the printer if the issue persists."); break;
|
||||
case PrinterFileSystem::ListSyncing: icon = m_bmp_loading; msg = _L("Loading file list..."); break;
|
||||
case PrinterFileSystem::ListReady: icon = extra == 0 ? m_bmp_empty : m_bmp_failed; msg = extra == 0 ? _L("No files [%d]") : _L("Load failed [%d]"); break;
|
||||
case PrinterFileSystem::ListReady: icon = extra == 0 ? m_bmp_empty : m_bmp_failed; msg = extra == 0 ? _L("No files") : _L("Load failed"); break;
|
||||
}
|
||||
int err = fs->GetLastError();
|
||||
if (!e.GetString().IsEmpty())
|
||||
msg = e.GetString();
|
||||
if (err != 0)
|
||||
msg += wxString::Format(" [%d]", err);
|
||||
msg += " [%d]";
|
||||
if (fs->GetCount() == 0 && !msg.empty())
|
||||
m_image_grid->SetStatus(icon, msg);
|
||||
if (e.GetInt() == PrinterFileSystem::Initializing)
|
||||
|
|
|
@ -203,6 +203,7 @@ void PrinterFileSystem::ListAllFiles()
|
|||
}
|
||||
BuildGroups();
|
||||
UpdateGroupSelect();
|
||||
m_last_error = 0;
|
||||
m_status = Status::ListReady;
|
||||
SendChangedEvent(EVT_STATUS_CHANGED, m_status);
|
||||
SendChangedEvent(EVT_FILE_CHANGED);
|
||||
|
|
Loading…
Reference in New Issue